Recently I've been sent sources of the app I need to build and deploy to TestFlight. Unfortunatly whenever I try to run the app on my test device in debug mode or the one installed from TestFlight, it fails to start throwing the following error message:
dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
Referenced from: /var/containers/Bundle/Application/77FB1F81-25F5-4670-ACF1-F814543B9A0E/MyApp.app/MyApp
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/77FB1F81-25F5-4670-ACF1-F814543B9A0E/MyApp.app/Frameworks/Alamofire.framework/Alamofire: code signing blocked mmap() of '/private/var/containers/Bundle/Application/77FB1F81-25F5-4670-ACF1-F814543B9A0E/MyApp.app/Frameworks/Alamofire.framework/Alamofire'
/private/var/containers/Bundle/Application/77FB1F81-25F5-4670-ACF1-F814543B9A0E/MyApp.app/Frameworks/Alamofire.framework/Alamofire: code signing blocked mmap() of '/private/var/containers/Bundle/Application/77FB1F81-25F5-4670-ACF1-F814543B9A0E/MyApp.app/Frameworks/Alamofire.framework/Alamofire'
/private/var/containers/Bundle/Application/77FB1F81-25F5-4670-ACF1-F814543B9A0E/MyApp.app/Frameworks/Alamofire.framework/Alamofire: code signing blocked mmap() of '/private/var/containers/Bundle/Application/77FB1F81-25F5-4670-ACF1-F814543B9A0E/MyApp.app/Frameworks/Alamofire.framework/Alamofire'
The app uses COCOAPODS as a dependency manager. In the Podfile there's TRON pod which depends on Alamofire framework we have problem with. The app built, signed and validated successfully during submission and debug builds. So it doesn't seem to be related to certificates or provision profiles. But I've anyway recreated certificates and provision profiles. (although I believe this is not the case as the app is submitted to app store successfully). Developer of the app builds and runs the app with no problem. We checked the versions of used tools and libraries and they seem to be indentical. (xcode version, cocoapods version, pods dependencies). I even tried to build the sources with all dependencies installed (pod install), that he builds.
There're similar questions on SO, but they don't seem to deal with COCOAPODS when they face this problem. The solution is usually involves manually Embedding frameworks. But this is not the approriate solution for us, as all demendencies integrated through COCOAPOD scripts.
What else can cause the problem?
This is an issue with iOS 13.3.1. All dynamic frameworks being compiled to the newest release of iOS 13.3.1 are experiencing this issue when running on a personal provisioning profile/developer account.
You can:
Use a non-Personal Team provisioning profile (paid developer account). Run on the 13.3.1 simulator. Test on a real iOS device running 13.3 or lower. This issue will be fixed in 13.4 Beta version though.
The problem was not related to specific app. Building any app even the most simple one produced the same error.
Solved by reinstalling Apple Worldwide Developer Relations Certification Authority, even though it wasn't expired.
Steps:
JIC: Remove provision profiles, clean project, restart xcode/Mac :-)
in my case, the problem was related to Apple Worldwide Developer Relations Certification Authority and i solve it by change trust from always to use system defaults.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With