Reputation: 475
I have installed Realm Framework in my project(in XCode 7.3.1). But now after updating xcode to 8 i convert my project code to swift 3.0. and getting this error
Module file was created by an Older version of the compiler; Rebuild "Realm Swift", try Again
I rebuild, but could not resolve this error. So to resolve this issue, download latest Realm Framework from realm.io and replace older with new (swift 3.0).
Now i am getting this Error.
Module file was created by a newer version of Compiler.
please suggest me how can i resolve this incompatibility issue.
Upvotes: 2
Views: 4318
Reputation: 2204
to manage the problem with Realm you had to change your Podfile and download last Realm version. Change pod 'RealmSwift' to pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: 'master', submodules: true. And dont't forget to add at the end of your podfile
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
Upvotes: 2
Reputation: 1354
Xcode itself providing a option to migrate from swift 2.3 to swift 3.0. Update your Xcode to the latest 8.0 and here you go.
Edit > Convert > To Current Swift Syntax
there you have an option to convert which version you want!
hope this answer will help you!
Upvotes: 4
Reputation: 15991
Since 3.1 isn't in Xcode yet, there shouldn't be any way you can cause a Module file was created by a newer version of Compiler.
error if you're using Xcode 8 and Realm Swift built for Swift 3.
Make sure you're running Xcode 8, and the Realm Swift 3 binary. It might be necessary to completely remove all references to the previous Realm Swift framework in your app and re-embedding it from scratch to be sure.
Upvotes: 0