Hiroyuki Kikuchi
Hiroyuki Kikuchi

Reputation: 49

Incompatible library version for libswiftCore.dylib after integrating Realm Swift

After installing Realm Swift, I see the following error when running my test program from within Xcode:

dyld: Library not loaded: @rpath/libswiftCore.dylib
 Referenced from: /Users/(*****)/Library/Developer/CoreSimulator/Devices/*****/data/Containers/Bundle/Application/*****/My.app/Frameworks/RealmSwift.framework/RealmSwift
 Reason: Incompatible library version: RealmSwift requires version 1.0.0 or later, but libswiftCore.dylib provides version 0.0.0

I have tried:

I am using Xcode 7.2.1 with Swift 2.1.1, and am integrating Realm using its dynamic Framework.

Upvotes: 2

Views: 4656

Answers (1)

jpsim
jpsim

Reputation: 14409

Apple states that you can't mix and match binaries built with different versions of Swift: https://developer.apple.com/swift/blog/?id=2

So you have two choices:

  1. Build Realm Swift from source following the instructions found at https://realm.io/docs/swift/latest/#installation
  2. Use a prebuilt version of Realm Swift built with the same version of Swift as your project. 0.98.5 was the last version built with Swift 2.1.1: https://github.com/realm/realm-cocoa/releases/tag/v0.98.5. 0.98.6 and later are built with Swift 2.2.

Upvotes: 2

Related Questions