1

I'm with a problem that I can't run any project on my iPhone. I can run in the simulator and others iPhones.

This is what happened:

1 - I was running many apps on my iPhone

2 - In a certain moment, I couldn't run because my iPhone reached the limit of provisioning profiles on the device

3 - So I deleted the provisioning profile on the device by the mac (libraries>mobileDevice> provisiongProfiles)

4 - After that, any project with an external library (Alamofire, Firebase, etc) is crashing when opening

5 - This is the error:

dyld: Library not loaded: @rpath/NMAKit.framework/NMAKit
Referenced from: /private/var/containers/Bundle/Application/55619F73-FDCC-452B-B834- 
CC22C78A190E/navigation_poc.app/navigation_pocReason: no suitable image found.  Did find: 
/private/var/containers/Bundle/Application/55619F73-FDCC-452B-B834- 
CC22C78A190E/navigation_poc.app/Frameworks/NMAKit.framework/NMAKit: code signature invalid 
for '/private/var/containers/Bundle/Application/55619F73-FDCC-452B-B834- 
CC22C78A190E/navigation_poc.app/Frameworks/NMAKit.framework/NMAKit'

Atention: I don't have an apple developer account, I use xcode automatically Team an Provisioning Profile

I use an Iphone 8 and Xcode 11.3

  • 1
    This is an issue with iOS 13.3.1 https://stackoverflow.com/questions/60015309/running-ios-apps-causes-runtime-error-for-frameworks-code-signature-invalid – Zachary Bell Feb 13 '20 at 20:06

2 Answers2

0

Just do the following command,

rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Caches/com.apple.dt.Xcode

You can even try to clean the project by CMD+SHIFT+K and deleting DerivedData via XCode,

enter image description here

Harish
  • 2,496
  • 4
  • 24
  • 48
0

I have tried many things and nothing worked (reinstall provisioning profiles, change appleId, change build configurations, write line commands on terminal, restart and reinstall everything, Keychain settings to "Use System Defaults" , etc)

Finally something worked for me:

I'm using CocoaPods, and for me this fixes the error ->

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