After updating iOS, all applications using the framework stopped running on the device, but they run on the simulator

后端 未结 5 1435
半阙折子戏
半阙折子戏 2020-11-30 10:50

error:
{ dyld: Library not loaded: @rpath/Realm.framework/Realm Referenced from: /private/var/containers/Bundle/Application/43190AF8-F437-4B8F-9827-DDEA599AF6

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-30 11:05

    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

提交回复
热议问题