Hi,
I have installed the Realm Objective C Framework (2.0.3) by simply dragging it into my project created in Xcode 8. When I first tried it on simulator I got the typical dyld error.
dyld: Library not loaded: @rpath/Realm.framework/Realm
Referenced from: /var/containers/Bundle/Application/89F5987A-F3F0-45F2-9014-6BA662135E00/RelamDemo.app/RelamDemo
Reason: image not found
So I tried to fix it using the following suggestion:
https://github.com/realm/realm-cocoa/issues/1681#issuecomment-120749962
In my case I only added Realm.framework. And it worked on iOS 10 Simulators.
But when I tried to run the same project on a device (iOS 10/9.3.2) I got the same dyld error again.
I have checked that I have copied the Realm.framework in my project. Now how can I solve the problem?
Realm version: 2.0.3
Xcode version: Xcode 8
iOS/OSX version: 10, 9.3.2
MacOS : 10.12
Make sure you dragged Realm.framework to the "Embedded Binaries" section in your project's General settings tab. Also make sure you have "Embed Frameworks" build phase and Realm.framework is included there.
Installation section in documentation should be also helpful.
That worked. Thanks.
just in case if anyone needs. I compiled static libraries with Xcode 9.1 swift 4.0.2 here https://github.com/amirpervaiz086/Realm-swift-4.0.2
@stel that works , thanks
I had the same issue in Xcode 11.4 and I fixed it by editing my pod file to:
platform :ios, '13.0'
target 'YourTarget' do
#use_frameworks! -> !!! very important
pod 'Realm', :modular_headers => true
pod 'RealmSwift', :modular_headers => true
end
I fixed it by changing Embed preferences from Do Not Embed to Embed & Sign.

Most helpful comment
Make sure you dragged
Realm.frameworkto the "Embedded Binaries" section in your project's General settings tab. Also make sure you have "Embed Frameworks" build phase andRealm.frameworkis included there.Installation section in documentation should be also helpful.