Integrate RealmReact with RealmSwift


#1

Hi guys. I have a database using Realm which is defined in packages.json and created in JS. Now i would to move some operation (because of performance) to native part. When i download library in ios with pods there is an error with library versions. So i upgrade my library version in packages.json to latest. Now i try to download native library on ios using cocapods. I downloaded latest version. But now when i am running project i have issue like on the photo.

How can i resolve this problem? I need to have access to database from swift. Maybe it is possible to somehow use in swift realmreact library from JS?


#2

@forfiter9 This is not possible today. We do not support realm-js and RealmSwift in the same app.


#3

@ianward So how can i write some ios native code which is using realm in react native app ?


#4

@forfiter9 You cannot - sorry.


#5

@ianward and how about Objective-C ?


#6

@forfiter9 the swift binding is built on obj-c so no, not at this time


#7

Is this still not possible today? If so, is there a better workaround than creating a NativeModule to expose RealmCocoa/RealmSwift to React Native?