问题
error:
{
dyld: Library not loaded: @rpath/Realm.framework/Realm
Referenced from: /private/var/containers/Bundle/Application/43190AF8-F437-4B8F-9827-DDEA599AF618/Favorite Places.app/Favorite Places
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/43190AF8-F437-4B8F-9827-DDEA599AF618/Favorite Places.app/Frameworks/Realm.framework/Realm: code signature invalid for '/private/var/containers/Bundle/Application/43190AF8-F437-4B8F-9827-DDEA599AF618/Favorite Places.app/Frameworks/Realm.framework/Realm'
/private/var/containers/Bundle/Application/43190AF8-F437-4B8F-9827-DDEA599AF618/Favorite Places.app/Frameworks/Realm.framework/Realm: stat() failed with errno=25
/private/var/containers/Bundle/Application/43190AF8-F437-4B8F-9827-DDEA599AF618/Favorite Places.app/Frameworks/Realm.framework/Realm: code signature invalid for '/private/var/containers/Bundle/Application/43190AF8-F437-4B8F-9827-DDEA599AF618/Favorite Places.app/Frameworks/Realm.framework/Realm'
/private/var/containers/Bundle/Application/43190AF8-F437-4B8F-9827-DDEA599AF618/Favorite Places.app/Frameworks/Realm.framework/Realm: stat() failed with errno=1
/private/var/containers/Bundle/Application/43190AF8-F437-4B8F-9827-DDEA599AF618/Favorite Places.app/Frameworks/Realm.framework/Realm: code signature invalid for '/private/var/containers/Bundle/Application/43190AF8-F437-4B8F-9827-DDEA599AF618/Favorite Places.app/Frameworks/Realm.framework/Realm'
/private/var/containers/Bundle/Application/43190AF8-F437-4B8F-9827-DDEA599AF618/Favorite Places.app/Frameworks/Realm.framework/Realm: stat() failed with errno=1
(lldb)
}
回答1:
I had the same issue with realm, it would work on the simulator but crash instantly on the actual devices. It seems when updating to iOS 13.3.1 Apple changed the behaviour of free apple developer accounts, no longer allowing them to use embedded frameworks.
The solution is to remove the use_frameworks!
in your Podfile and replace it with use_modular_headers!
e.g.
target 'your_project_name' do
use_modular_headers!
pod 'RealmSwift'
end
This will include them as static libraries instead. I stumbled upon the solution in this GitHub issue: https://github.com/Alamofire/Alamofire/issues/3051
回答2:
Removing use_frameworks
. It will break your Firebase pods.
For projects that utilize Firebase pods, your solutions consist of the following..
- Downgrade your iOS device
- Create & pay for an Apple Developer Program
- Use the simulator and wait for future iOS updates that will hopefully once again allow free dev accounts to use Frameworks again..
This is very often issue which needs to be eliminated by official sources
来源:https://stackoverflow.com/questions/60045282/after-updating-ios-all-applications-using-the-framework-stopped-running-on-the