Realm support for Swift 3.0 Realm support for Swift 3.0 ios ios

Realm support for Swift 3.0


You can use Realm with Swift 3.0, but take into account that the current version is still absolutely experimental.

You can clone the master branch of the realm-cocoa repo from GitHub.

Or you can use Carthage:

github "realm/realm-cocoa.git" "master"

Or if you prefer CocoaPods:

pod 'RealmSwift', :git => 'https://github.com/realm/realm-cocoa.git', :branch => 'master'

If you use Carthage, remember that you must add Realm and RealmSwift frameworks manually (ignore the IBAnimatable framework):

Project configuration image

In fact, I have one of my projects with Xcode 8, Swift 3 and Realm, and it works perfectly :)


Starting from version 1.1.0 Realm is officially compatible with Swift 3.0/Xcode 8.0. See here.

This release brings official support for Xcode 8, Swift 2.3 and Swift 3.0. Prebuilt frameworks are now built with Xcode 7.3.1 and Xcode 8.0.

Here's an extract from the install docs :

If using Xcode 8, paste the following at the bottom of your Podfile, updating the Swift version if necessary:

post_install do |installer|  installer.pods_project.targets.each do |target|    target.build_configurations.each do |config|      config.build_settings['SWIFT_VERSION'] = '2.3' # or '3.0'    end  endend


Realm released a new version 1.1.0. If you are using Cocoapods suggest you to check this PR and install the version 1.1.0.rc.2 to avoid the compile error Use Legacy Swift Language Version.