1
votes

update: May 20--I just tried Realm 0.103.0 and received the same error when running a Cocoa OS X app using Realm.


I'm trying to install the latest Realm Database (0.102.0) to use with Xcode 7.3 I'm upgrading from Realm 0.98.

I receive the following runtime error:

dyld: Library not loaded: @rpath/libswiftIOKit.dylib Referenced from: /Users/user/Library/Developer/Xcode/DerivedData/demo-timelines-eepbldhwvcbcmhhjqauxknfhzofv/Build/Products/Debug/demo-timelines.app/Contents/Frameworks/RealmSwift.framework/Versions/A/RealmSwift Reason: image not found

I decided to start with a fresh Xcode 7.3 project, but I get the same error. What I have so far:

  1. New Cocoa App (for OS X 10.11.4) (using Swift language with a Storyboard)
  2. Downloaded Realm database for Swift (Realm version 0.102.0)
  3. Dragged framework files from OS X->swift 2.2 to the binaries section
  4. Updated the path to the framework (in Build Settings)
  5. Added a single line to the ViewController "import RealmSwift"

I get the same error when attempting to do the fresh install. I've done several Realm Database updates without incident.

Suggestions?

1
Cleaned project, deleted derived data, restarted xcode?Dejan Skledar
I started with a new project and I did restart Xcode. I'm not sure what derived data I should have deleted.KR McGinley
What do you mean by 'Updated the path to the framework'? As long as 'Copy items if needed' is checked when you drag the framework into your project, you shouldn't need to change any paths for the framework. Are you following the installation steps from the Realm website?TiM
I followed the steps from the Realm website...specifically step #3: " In your unit test target’s “Build Settings”, add the parent path to RealmSwift.framework in the “Framework Search Paths” section." When I checked the path it was already set correctly as you mentioned.KR McGinley
I'm hoping this information might help someone narrow down the issue for me. I've downloaded Realm for Swift versions 0.98.6 and 0.102.0. I created a new Cocoa OS X app (Xcode 7.3) and added the "swift 2.2" folder from the Realm 0.98.6 folder to the target's embedded binary section. The project will compile and display the main window. I repeat the same steps (create a new Cocoa app for OS X, etc, only added the "swift 2.2" folder from the Realm 0.102.0 folder to the target's embedded binary section). The project compiles but crashes with the error shown in the original message above.KR McGinley

1 Answers

0
votes

I read this post (github.com/realm/realm-cocoa/issues/3619), so I decided to upgrade Xcode from 7.3 to 7.3.1 I'm surprised that it didn't automatically update . . . Anyway, the upgrade fixed my Realm (0.103.2)/Swift2.2 (on OS X) problem. –