Glenn
Glenn

Reputation: 67

dyld: Library not loaded error in Swift - IQKeyboardManagerSwift

My app has been building and testing successfully on my iPhone since I began development.

It just started failing to build within the simulator; a Clean Build Folder fixed the simulator, but now when building on my phone I get:

  Referenced from: /private/var/containers/Bundle/Application/89F8B333-855C-4DE8-8A6A-E2472EF176DA/MyApp.app/MyApp
  Reason: no suitable image found.  Did find:
    /private/var/containers/Bundle/Application/89F8B333-855C-4DE8-8A6A-E2472EF176DA/MyApp.app/Frameworks/IQKeyboardManagerSwift.framework/IQKeyboardManagerSwift: 
    code signature invalid for '/private/var/containers/Bundle/Application/89F8B333-855C-4DE8-8A6A-E2472EF176DA/MyApp.app/Frameworks/IQKeyboardManagerSwift.framework/IQKeyboardManagerSwift'`

This is out of the blue; I've not done anything to the keyboard library, I've not added any new libraries.

Upvotes: 0

Views: 1196

Answers (2)

Glenn
Glenn

Reputation: 67

From @Paul11100 here

  1. Open the podfile
  2. Comment out use_frameworks!
  3. Add use_modular_headers!
  4. In Terminal, do a pod update -> pod install
  5. In Xcode, Clean (Command-Shift-K) -> Build and Run.

Source: https://github.com/Alamofire/Alamofire/issues/3051

Upvotes: 1

Harish
Harish

Reputation: 2512

This might have happened if your certificates are revoked.

You may try to clean the project and clean the derived data by doing CMD-Shift-K and XCode -> Preferences -> Locations -> goto your Derived Data folder and delete your project files.

If nothing works try to use terminal with the below command

rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"

Upvotes: 0

Related Questions