I’m fairly new at using Realm with Swift and with RealmSwift in general, so I may have missed something here.
I have a SwiftUI music project that I’m developing and it was working fine with RealmSwift until yesterday. Now I get messages about the compiler being incompatible. So to try to find out more, I tried to create a new SwiftUI project using RealmSwift in realm-cocoa and found that I could not get it to load, hanging on “Verifying realm-cocoa”.
Here’s the compiler-related error I am getting with my main project:
/Users/brucecichowlas/blue/sami/210723/SAMI/SAMI/Views and ViewModels/Selection Views/NamedPatchSelectionView.swift:9:8: error: module compiled with Swift 5.5.1 cannot be imported by the Swift 5.5.2 compiler: /Users/brucecichowlas/Library/Developer/Xcode/DerivedData/SAMI-bwvakqpaaigygsbyohqxxlboahbx/Build/Products/Debug-iphonesimulator/RealmSwift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
import RealmSwift
I tried building from source and did manage to get a successful build with Frameworks, which I tried to drag into the project, but got errors with that, probably due to inexperience trying to incorporate Realm that way. module ‘RealmSwift’ was created for incompatible target x86_64-apple-macos10.9: /Users/brucecichowlas/blue/try/210805/TryRealmOnIOS/TryRealmOnIOS/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftmodule I’d much rather go back to using RealmSwift in realm-cocoa as before, but I suppose I could build from source if I could figure out errors like this one.
But the problem I am most interesed in solving is the first one with the apparent compiler version mismatch.
Suggestions?
Thanks,
Bruce