Uploaded image for project: 'Realm Dart SDK'
  1. Realm Dart SDK
  2. RDART-730

Using `realm-dart` alongside `RealmSwift`

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      What happened?

      We're working on a production Flutter app (on iOS) that's currently using RealmSwift, and we'd would like to migrate to using `realm` instead for the main app.

      However, we need to be able to use both of these side-by-side, since we have native code supporting the home screen widgets and lock screen widgets on iPhone as well as our Apple Watch companion app (which currently also use RealmSwift).

      It does not seem possible to compile an iOS app using both, as pod install throws the following exception:
      The 'Pods-Runner' target has frameworks with conflicting names: realm.

      Is there a way to run both RealmSwift and realm-dart together?

      Repro steps

      1. Create a fresh Flutter app supporting iOS (run flutter create -t app --platforms ios test).
      2. Run flutter add realm from the app directory to add the realm package.
      3. Add pod 'RealmSwift', '10.36.0' to ios/Podfile (or any other version of the pod for that matter).
      4. Run pod install from the ios folder.
      5. See the command fail with The 'Pods-Runner' target has frameworks with conflicting names: realm..

      The issue persists regardless of the versions of realm or RealmSwift.

      Version

      1.0.2

      What Atlas Services are you using?

      Local Database only

      What type of application is this?

      Flutter Application

      Client OS and version

      iOS 16

      Code snippets

      No response

      Stacktrace of the exception/crash you're getting

      The 'Pods-Runner' target has frameworks with conflicting names: realm.

      Relevant log output

      No response

            Assignee:
            yavor.georgiev@mongodb.com Yavor Georgiev
            Reporter:
            unitosyncbot Unito Sync Bot
            Team Yavor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: