更新iOS后,使用该框架的所有应用程序都停止在设备上运行,但是它们在模拟器上运行 [英] After updating iOS, all applications using the framework stopped running on the device, but they run on the simulator

查看:81
本文介绍了更新iOS后,使用该框架的所有应用程序都停止在设备上运行,但是它们在模拟器上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误:
{ dyld:库未加载:@ rpath/Realm.framework/Realm 引用自:/private/var/containers/Bundle/Application/43190AF8-F437-4B8F-9827-DDEA599AF618/Favorite Places.app/Favorite Places 原因:找不到合适的图像.确实找到了: /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'

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) 
}

推荐答案

我对领域有同样的问题,它可以在模拟器上运行,但在实际设备上会立即崩溃. 似乎在更新到iOS 13.3.1时,Apple更改了免费的Apple开发人员帐户的行为,不再允许他们使用嵌入式框架.

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.

解决方案是删除Podfile中的use_frameworks!并将其替换为use_modular_headers!

The solution is to remove the use_frameworks! in your Podfile and replace it with use_modular_headers!

例如

target 'your_project_name' do
    use_modular_headers!
    pod 'RealmSwift'
end

这会将它们包括为静态库. 我偶然发现了这个GitHub问题中的解决方案: https://github.com/Alamofire/Alamofire/issues/3051

This will include them as static libraries instead. I stumbled upon the solution in this GitHub issue: https://github.com/Alamofire/Alamofire/issues/3051

这篇关于更新iOS后,使用该框架的所有应用程序都停止在设备上运行,但是它们在模拟器上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆