CloudKit Changes for Swift
CloudKit
Removed CKOperation.activityStart() -> os_activity_t
Added CKContainer.fetchAllLongLivedOperationIDsWithCompletionHandler(_: ([String]?, NSError?) -> Void)
Added CKOperation.longLived
Added CKOperation.operationID
Modified CKContainer
Declaration | |
---|---|
From | class CKContainer : NSObject { init() class func defaultContainer() -> CKContainer init(identifier containerIdentifier: String) class func containerWithIdentifier(_ containerIdentifier: String) -> CKContainer var containerIdentifier: String? { get } func addOperation(_ operation: CKOperation) } extension CKContainer { var privateCloudDatabase: CKDatabase { get } var publicCloudDatabase: CKDatabase { get } } extension CKContainer { func accountStatusWithCompletionHandler(_ completionHandler: (CKAccountStatus, NSError?) -> Void) } extension CKContainer { func statusForApplicationPermission(_ applicationPermission: CKApplicationPermissions, completionHandler completionHandler: CKApplicationPermissionBlock) func requestApplicationPermission(_ applicationPermission: CKApplicationPermissions, completionHandler completionHandler: CKApplicationPermissionBlock) } extension CKContainer { func fetchUserRecordIDWithCompletionHandler(_ completionHandler: (CKRecordID?, NSError?) -> Void) func discoverAllContactUserInfosWithCompletionHandler(_ completionHandler: ([CKDiscoveredUserInfo]?, NSError?) -> Void) func discoverUserInfoWithEmailAddress(_ email: String, completionHandler completionHandler: (CKDiscoveredUserInfo?, NSError?) -> Void) func discoverUserInfoWithUserRecordID(_ userRecordID: CKRecordID, completionHandler completionHandler: (CKDiscoveredUserInfo?, NSError?) -> Void) } |
To | class CKContainer : NSObject { init() class func defaultContainer() -> CKContainer init(identifier containerIdentifier: String) class func containerWithIdentifier(_ containerIdentifier: String) -> CKContainer var containerIdentifier: String? { get } func addOperation(_ operation: CKOperation) } extension CKContainer { var privateCloudDatabase: CKDatabase { get } var publicCloudDatabase: CKDatabase { get } } extension CKContainer { func accountStatusWithCompletionHandler(_ completionHandler: (CKAccountStatus, NSError?) -> Void) } extension CKContainer { func statusForApplicationPermission(_ applicationPermission: CKApplicationPermissions, completionHandler completionHandler: CKApplicationPermissionBlock) func requestApplicationPermission(_ applicationPermission: CKApplicationPermissions, completionHandler completionHandler: CKApplicationPermissionBlock) } extension CKContainer { func fetchUserRecordIDWithCompletionHandler(_ completionHandler: (CKRecordID?, NSError?) -> Void) func discoverAllContactUserInfosWithCompletionHandler(_ completionHandler: ([CKDiscoveredUserInfo]?, NSError?) -> Void) func discoverUserInfoWithEmailAddress(_ email: String, completionHandler completionHandler: (CKDiscoveredUserInfo?, NSError?) -> Void) func discoverUserInfoWithUserRecordID(_ userRecordID: CKRecordID, completionHandler completionHandler: (CKDiscoveredUserInfo?, NSError?) -> Void) } extension CKContainer { func fetchAllLongLivedOperationIDsWithCompletionHandler(_ completionHandler: ([String]?, NSError?) -> Void) func fetchLongLivedOperationWithID(_ operationID: String, completionHandler completionHandler: (CKOperation?, NSError?) -> Void) } |
Modified CKOperation
Declaration | |
---|---|
From | class CKOperation : NSOperation { init() func activityStart() -> os_activity_t var container: CKContainer? var usesBackgroundSession: Bool var allowsCellularAccess: Bool } |
To | class CKOperation : NSOperation { init() var container: CKContainer? var usesBackgroundSession: Bool var allowsCellularAccess: Bool var operationID: String { get } var longLived: Bool var longLivedOperationWasPersistedBlock: () -> Void } |