Swift Compiler Error RealmSwift, Xcode 8.2

157 views Asked by At

I'm seeing an "Argument labels '(iCloudToken:)' do not match any available overloads" in Sync.swift.

/// Initialize new credentials using an iCloud account token.
public static func iCloud(token: Token) -> SyncCredentials {
    return SyncCredentials(RLMSyncCredentials(iCloudToken: token))
}

Is there a fix for this error?

1

There are 1 answers

0
TiM On

We renamed that method from iCloud to cloudKit in the latest version of the API. We realized that our authentication mechanism is a wholly CloudKit-based implementation, so referring to it as iCloud was incorrect.

public static func cloudKit(token: Token) -> SyncCredentials {
    return SyncCredentials(RLMSyncCredentials(cloudKitToken: token))
}

The documentation will be updated soon to reflect this. Sorry for the confusion!