Reputation: 11
Summary: Swift allows me to import RealmSwift
, but it doesn't allow me to create a new instance of the Realm
class (or type any code using Realm keywords). I don't have any other code because this is a brand new project.
Steps to Reproduce: 1. Make a new Xcode project 2. In Terminal, cd to the project and type 'pod init' 3. Open the Podfile and add the pod 'RealmSwift' 4. Open the Xcode project's workspace and go to the AppDelegate file 5. Import 'RealmSwift' 6. Make a new variable and make it an instance of the Realm class
Expected Results: The program runs and lets me make a new instance of the Realm class.
Actual Results: The program crashes with the following errors:
Command failed due to signal: Abort trap: 6" & "error: fatal error encountered while reading from module 'RealmSwift'.
Also, at the top of the file where I wrote the code using Realm keywords, it says:
An Internal error occurred. Source editor functionality is limited. Attempting to restore...
This is a Swift Compiler Error btw
Version/Build:
Realm version: 3.7.4
Xcode version: 4.1
Swift version: 4.1
configuration: MacBook Pro running macOS High Sierra
Upvotes: 1
Views: 463
Reputation: 672
If you use Xcode packages, you can replace "Up to next major" by the exact version of the package (10.19.0 in my case)
Upvotes: 0
Reputation: 138
Have you considered using a Dynamic Framework instead? I did use CocoaPods in the past but using a dynamic framework simplifies the process. Download the frameworks from here: https://realm.io/docs/swift/latest#installation
And follow the instructions:
After you've dragged the framework into your project, it looks like so:
Now, the hurdle is that since this is not done through pod files, you cannot automatically update the Realm version. This you will have to do manually by downloading the newest version of the framework from time to time.
Upvotes: 0