john doe
john doe

Reputation: 9660

Realm with Swift Error

I just created a new project and download and integrated the CocoaPods "RealmSwift". I get the following list of errors.

enter image description here

I have not added anything in my code. This is coming from Realm code. I am using Xcode 8 using Swift 3.0

Here is the Pod file:

enter image description here

If I say convert to Swift 3.0 then I get the following errors:

enter image description here

Upvotes: 0

Views: 808

Answers (1)

StanislavK
StanislavK

Reputation: 1962

It seems the documentation for CocoaPods for RealmSwift may-be out of date when Xcode 8.1+ and Swift 3 is used. Step 3 is no more needed and you should skip it for this case.

i.e. you should now use (example):

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'

target 'RealmProjectAzam' do

    use_frameworks!
    pod 'RealmSwift'

end

Edit - addition information: Please note, after the above question has been posted, there was some additional discussion incl. Realm and the result is that Realm (thanks @realm!) has adjusted its Swift documentation to better face the above issue. Please see the updated instructions for Cocoapods installation at realm.io

In short, to "solve" the above issue please:

Run pod repo update to make CocoaPods aware of the latest available Realm versions.

Upvotes: 1

Related Questions