I am sharing the realm between containing app and extension (custom Keyboard), and it works ok on simulator, but when I'm trying to run this app on the real device I have the following error:
Cannot load underlying module for 'RealmSwift'
It's kinda strange that it is not an issue with simulator but ok. Let's add pods.framework to Link Binary With Libraries for my extension.
.../Pods/Bolts/Bolts/Common/BFCancellationTokenRegistration.h:19:1: Duplicate interface definition for class 'BFCancellationTokenRegistration'
OK. Let's remove it.
Cannot load underlying module for 'RealmSwift'
Can't argue that. Let's try to add RealmSwift.framework to the extension.
.../Pods/Bolts/Bolts/Common/BFCancellationTokenRegistration.h:19:1: Duplicate interface definition for class 'BFCancellationTokenRegistration'
OK. After several iterations there are several Pods.framework in my project folder and RealmSwift.framework too. Let's remove them all except one Pods.framework. Let's change target membership for this framework to the app and the extension.
.../Pods/Bolts/Bolts/Common/BFCancellationTokenRegistration.h:19:1: Duplicate interface definition for class 'BFCancellationTokenRegistration'
and
Cannot load underlying module for 'RealmSwift'
together.
How could this be fixed?
Update: I am using Realm and Parse cocoapods.