I want to migrate a project from Xcode 7.3 and Swift 2.2 to Xcode 8 and Swift 2.3.
I am downloading the latest version of Realm and RealmSwift, 1.0.2. Expected code to compile.
Received compiler error:
"Type 'RLMRealm' has no member 'performMigrationForConfiguration'"
in file Pods/RealmSwift/Migration.swift
I thought this might be problem with the existing project, but was able to reproduce the error as follows:
Create a new single application project in Xcode 8. Pod init. Added RealmSwift to the podfile with this code:
pod 'RealmSwift', :git => 'https://github.com/realm/realm-cocoa.git', :branch => 'master'
Pod install. Converted code to Swift 2.3. Cleaned project, then ran project. Received Error.
Help would be appreciated!!!
You're using Realm Swift from master so you need to tell CocoaPods to also use Realm Objective-C from master:
pod 'Realm', :git => 'https://github.com/realm/realm-cocoa.git', :branch => 'master'
pod 'RealmSwift', :git => 'https://github.com/realm/realm-cocoa.git', :branch => 'master'
Otherwise CocoaPods will try to use Realm Swift from our Git master against the most recent release of Realm Objective-C, which isn't likely to work.
Awesome! Thanks @bdash, that solved the issue!
It looks like for older versions of cocoapods (0.39 in my case) you need the following:
pod 'Realm', :git => 'https://github.com/realm/realm-cocoa.git', :branch => 'master', submodules: true
pod 'RealmSwift', :git => 'https://github.com/realm/realm-cocoa.git', :branch => 'master', submodules: true
@brynjar I did that and I get these errors:

I still can not use realm with Xcode 8
From the top error in your screenshot - did you do a clean build?
@brynjar ok I did a clean build and it works, thank you !!
I was using RealmSwift 2.1.2. I recently updated to RealmSwift 2.4.3.
Using Swift 2.3
Cocoapods 1.2.0
While I built the project, it produces a list of 483 Build errors in RealmSwift pod.

Please help me.
As of v2.4.0, Swift 2.x is no longer supported.
@bdash Thanks
@alejandro-menendez what did you do instead? I have the exact same issue.
@Tindi as of now I am using 2.3.0 ( pod 'RealmSwift', '2.3.0' ).
@alejandro-menendez yeah did the same. But thanks for your response! I'll migrate to Swift 3 soon.
@Tindi same here
Most helpful comment
It looks like for older versions of cocoapods (0.39 in my case) you need the following: