Search code examples
iosswiftxcodeiqkeyboardmanager

IQKeyboardManagerSwift 'shared' is unavailable: Use view controller based solutions where appropriate instead


Installing IQKeyboardManagerSwift via CocoaPods works, but when I build my project I get multiple build time errors saying the following:

'shared' is unavailable: Use view controller based solutions where appropriate instead.

Why is this happening? I have tried different versions of the library. I am on Xcode v10.2.1.


Solution

  • Seems like the problem is that you are using extensions in your app. Try setting Require Only App-Extension_safe API to No inside your Pods project for the IQKeyboardManagerSwift target.

    Image of setting