Documentation Archive Developer
Search

CloudKit Changes for Objective-C

CloudKit

CKContainer.h

Declaration
From
- (void)discoverAllContactUserInfosWithCompletionHandler:(void (^)(NSArray *userInfos, NSError *error))completionHandler
To
- (void)discoverAllContactUserInfosWithCompletionHandler:(void (^ _Nonnull)(NSArray<CKDiscoveredUserInfo *> * _Nullable userInfos, NSError * _Nullable error))completionHandler

CKDatabase.h

Declaration
From
- (void)fetchAllRecordZonesWithCompletionHandler:(void (^)(NSArray *zones, NSError *error))completionHandler
To
- (void)fetchAllRecordZonesWithCompletionHandler:(void (^ _Nonnull)(NSArray<CKRecordZone *> * _Nullable zones, NSError * _Nullable error))completionHandler

Declaration
From
- (void)fetchAllSubscriptionsWithCompletionHandler:(void (^)(NSArray *subscriptions, NSError *error))completionHandler
To
- (void)fetchAllSubscriptionsWithCompletionHandler:(void (^ _Nonnull)(NSArray<CKSubscription *> * _Nullable subscriptions, NSError * _Nullable error))completionHandler

Declaration
From
- (void)performQuery:(CKQuery *)query inZoneWithID:(CKRecordZoneID *)zoneID completionHandler:(void (^)(NSArray *results, NSError *error))completionHandler
To
- (void)performQuery:(CKQuery * _Nonnull)query inZoneWithID:(CKRecordZoneID * _Nullable)zoneID completionHandler:(void (^ _Nonnull)(NSArray<CKRecord *> * _Nullable results, NSError * _Nullable error))completionHandler

CKDiscoverAllContactsOperation.h

Declaration
From
@property(nonatomic, copy) void (^discoverAllContactsCompletionBlock)(NSArray *userInfos, NSError *operationError)
To
@property(nonatomic, copy, nullable) void (^discoverAllContactsCompletionBlock)(NSArray<CKDiscoveredUserInfo *> * _Nullable userInfos, NSError * _Nullable operationError)

CKDiscoveredUserInfo.h

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

CKDiscoverUserInfosOperation.h

Declaration
From
@property(nonatomic, copy) void (^discoverUserInfosCompletionBlock)(NSDictionary *emailsToUserInfos, NSDictionary *userRecordIDsToUserInfos, NSError *operationError)
To
@property(nonatomic, copy, nullable) void (^discoverUserInfosCompletionBlock)(NSDictionary<NSString *,CKDiscoveredUserInfo *> * _Nullable emailsToUserInfos, NSDictionary<CKRecordID *,CKDiscoveredUserInfo *> * _Nullable userRecordIDsToUserInfos, NSError * _Nullable operationError)

Declaration
From
@property(nonatomic, copy) NSArray *emailAddresses
To
@property(nonatomic, copy, nullable) NSArray<NSString *> *emailAddresses

Declaration
From
- (instancetype)initWithEmailAddresses:(NSArray *)emailAddresses userRecordIDs:(NSArray *)userRecordIDs
To
- (instancetype _Nonnull)initWithEmailAddresses:(NSArray<NSString *> * _Nullable)emailAddresses userRecordIDs:(NSArray<CKRecordID *> * _Nullable)userRecordIDs

Declaration
From
@property(nonatomic, copy) NSArray *userRecordIDs
To
@property(nonatomic, copy, nullable) NSArray<CKRecordID *> *userRecordIDs

CKFetchRecordChangesOperation.h

Declaration
From
@property(nonatomic, copy) NSArray *desiredKeys
To
@property(nonatomic, copy, nullable) NSArray<NSString *> *desiredKeys

CKFetchRecordsOperation.h

Declaration
From
@property(nonatomic, copy) NSArray *desiredKeys
To
@property(nonatomic, copy, nullable) NSArray<NSString *> *desiredKeys

Declaration
From
@property(nonatomic, copy) void (^fetchRecordsCompletionBlock)(NSDictionary *recordsByRecordID, NSError *operationError)
To
@property(nonatomic, copy, nullable) void (^fetchRecordsCompletionBlock)(NSDictionary<CKRecordID *,CKRecord *> * _Nullable recordsByRecordID, NSError * _Nullable operationError)

Declaration
From
- (instancetype)initWithRecordIDs:(NSArray *)recordIDs
To
- (instancetype _Nonnull)initWithRecordIDs:(NSArray<CKRecordID *> * _Nonnull)recordIDs

Declaration
From
@property(nonatomic, copy) NSArray *recordIDs
To
@property(nonatomic, copy, nullable) NSArray<CKRecordID *> *recordIDs

CKFetchRecordZonesOperation.h

Declaration
From
@property(nonatomic, copy) void (^fetchRecordZonesCompletionBlock)(NSDictionary *recordZonesByZoneID, NSError *operationError)
To
@property(nonatomic, copy, nullable) void (^fetchRecordZonesCompletionBlock)(NSDictionary<CKRecordZoneID *,CKRecordZone *> * _Nullable recordZonesByZoneID, NSError * _Nullable operationError)

Declaration
From
- (instancetype)initWithRecordZoneIDs:(NSArray *)zoneIDs
To
- (instancetype _Nonnull)initWithRecordZoneIDs:(NSArray<CKRecordZoneID *> * _Nonnull)zoneIDs

Declaration
From
@property(nonatomic, copy) NSArray *recordZoneIDs
To
@property(nonatomic, copy, nullable) NSArray<CKRecordZoneID *> *recordZoneIDs

CKFetchSubscriptionsOperation.h

Declaration
From
@property(nonatomic, copy) void (^fetchSubscriptionCompletionBlock)(NSDictionary *subscriptionsBySubscriptionID, NSError *operationError)
To
@property(nonatomic, copy, nullable) void (^fetchSubscriptionCompletionBlock)(NSDictionary<NSString *,CKSubscription *> * _Nullable subscriptionsBySubscriptionID, NSError * _Nullable operationError)

Declaration
From
- (instancetype)initWithSubscriptionIDs:(NSArray *)subscriptionIDs
To
- (instancetype _Nonnull)initWithSubscriptionIDs:(NSArray<NSString *> * _Nonnull)subscriptionIDs

Declaration
From
@property(nonatomic, copy) NSArray *subscriptionIDs
To
@property(nonatomic, copy, nullable) NSArray<NSString *> *subscriptionIDs

CKMarkNotificationsReadOperation.h

Declaration
From
- (instancetype)initWithNotificationIDsToMarkRead:(NSArray *)notificationIDs
To
- (instancetype _Nonnull)initWithNotificationIDsToMarkRead:(NSArray<CKNotificationID *> * _Nonnull)notificationIDs

Declaration
From
@property(nonatomic, copy) void (^markNotificationsReadCompletionBlock)(NSArray *notificationIDsMarkedRead, NSError *operationError)
To
@property(nonatomic, copy, nullable) void (^markNotificationsReadCompletionBlock)(NSArray<CKNotificationID *> * _Nullable notificationIDsMarkedRead, NSError * _Nullable operationError)

Declaration
From
@property(nonatomic, copy) NSArray *notificationIDs
To
@property(nonatomic, copy, nonnull) NSArray<CKNotificationID *> *notificationIDs

CKModifyRecordsOperation.h

Declaration
From
- (instancetype)initWithRecordsToSave:(NSArray *)records recordIDsToDelete:(NSArray *)recordIDs
To
- (instancetype _Nonnull)initWithRecordsToSave:(NSArray<CKRecord *> * _Nullable)records recordIDsToDelete:(NSArray<CKRecordID *> * _Nullable)recordIDs

Declaration
From
@property(nonatomic, copy) void (^modifyRecordsCompletionBlock)(NSArray *savedRecords, NSArray *deletedRecordIDs, NSError *operationError)
To
@property(nonatomic, copy, nullable) void (^modifyRecordsCompletionBlock)(NSArray<CKRecord *> * _Nullable savedRecords, NSArray<CKRecordID *> * _Nullable deletedRecordIDs, NSError * _Nullable operationError)

Declaration
From
@property(nonatomic, copy) NSArray *recordIDsToDelete
To
@property(nonatomic, copy, nullable) NSArray<CKRecordID *> *recordIDsToDelete

Declaration
From
@property(nonatomic, copy) NSArray *recordsToSave
To
@property(nonatomic, copy, nullable) NSArray<CKRecord *> *recordsToSave

CKModifyRecordZonesOperation.h

Declaration
From
- (instancetype)initWithRecordZonesToSave:(NSArray *)recordZonesToSave recordZoneIDsToDelete:(NSArray *)recordZoneIDsToDelete
To
- (instancetype _Nonnull)initWithRecordZonesToSave:(NSArray<CKRecordZone *> * _Nullable)recordZonesToSave recordZoneIDsToDelete:(NSArray<CKRecordZoneID *> * _Nullable)recordZoneIDsToDelete

Declaration
From
@property(nonatomic, copy) void (^modifyRecordZonesCompletionBlock)(NSArray *savedRecordZones, NSArray *deletedRecordZoneIDs, NSError *operationError)
To
@property(nonatomic, copy, nullable) void (^modifyRecordZonesCompletionBlock)(NSArray<CKRecordZone *> * _Nullable savedRecordZones, NSArray<CKRecordZoneID *> * _Nullable deletedRecordZoneIDs, NSError * _Nullable operationError)

Declaration
From
@property(nonatomic, copy) NSArray *recordZoneIDsToDelete
To
@property(nonatomic, copy, nullable) NSArray<CKRecordZoneID *> *recordZoneIDsToDelete

Declaration
From
@property(nonatomic, copy) NSArray *recordZonesToSave
To
@property(nonatomic, copy, nullable) NSArray<CKRecordZone *> *recordZonesToSave

CKModifySubscriptionsOperation.h

Declaration
From
- (instancetype)initWithSubscriptionsToSave:(NSArray *)subscriptionsToSave subscriptionIDsToDelete:(NSArray *)subscriptionIDsToDelete
To
- (instancetype _Nonnull)initWithSubscriptionsToSave:(NSArray<CKSubscription *> * _Nullable)subscriptionsToSave subscriptionIDsToDelete:(NSArray<NSString *> * _Nullable)subscriptionIDsToDelete

Declaration
From
@property(nonatomic, copy) void (^modifySubscriptionsCompletionBlock)(NSArray *savedSubscriptions, NSArray *deletedSubscriptionIDs, NSError *operationError)
To
@property(nonatomic, copy, nullable) void (^modifySubscriptionsCompletionBlock)(NSArray<CKSubscription *> * _Nullable savedSubscriptions, NSArray<NSString *> * _Nullable deletedSubscriptionIDs, NSError * _Nullable operationError)

Declaration
From
@property(nonatomic, copy) NSArray *subscriptionIDsToDelete
To
@property(nonatomic, copy, nullable) NSArray<NSString *> *subscriptionIDsToDelete

Declaration
From
@property(nonatomic, copy) NSArray *subscriptionsToSave
To
@property(nonatomic, copy, nullable) NSArray<CKSubscription *> *subscriptionsToSave

CKNotification.h

Declaration
From
@property(nonatomic, readonly, copy) NSArray *alertLocalizationArgs
To
@property(nonatomic, readonly, copy, nullable) NSArray<NSString *> *alertLocalizationArgs

Declaration
From
+ (instancetype)notificationFromRemoteNotificationDictionary:(NSDictionary *)notificationDictionary
To
+ (instancetype _Nonnull)notificationFromRemoteNotificationDictionary:(NSDictionary<NSString *,NSObject *> * _Nonnull)notificationDictionary

Declaration
From
@property(nonatomic, readonly, copy) NSDictionary *recordFields
To
@property(nonatomic, readonly, copy, nullable) NSDictionary<NSString *,__kindof id<CKRecordValue>> *recordFields

CKOperation.h

Added -[CKOperation activityStart]
Modified CKOperation.usesBackgroundSession
Deprecation
From--
ToiOS 9.0

CKQuery.h

Declaration
From
@property(nonatomic, copy) NSArray *sortDescriptors
To
@property(nonatomic, copy, nullable) NSArray<NSSortDescriptor *> *sortDescriptors

CKQueryOperation.h

Declaration
From
@property(nonatomic, copy) NSArray *desiredKeys
To
@property(nonatomic, copy, nullable) NSArray<NSString *> *desiredKeys

CKRecord.h

Declaration
From
- (NSArray *)allKeys
To
- (NSArray<NSString *> * _Nonnull)allKeys

Declaration
From
- (NSArray *)allTokens
To
- (NSArray<NSString *> * _Nonnull)allTokens

Declaration
From
- (NSArray *)changedKeys
To
- (NSArray<NSString *> * _Nonnull)changedKeys

Declaration
From
- (id)objectForKey:(NSString *)key
To
- (__kindof id<CKRecordValue> _Nullable)objectForKey:(NSString * _Nonnull)key

Declaration
From
- (id)objectForKeyedSubscript:(NSString *)key
To
- (__kindof id<CKRecordValue> _Nullable)objectForKeyedSubscript:(NSString * _Nonnull)key

Declaration
From
- (void)setObject:(id<CKRecordValue>)object forKey:(NSString *)key
To
- (void)setObject:(__kindof id<CKRecordValue> _Nullable)object forKey:(NSString * _Nonnull)key

Declaration
From
- (void)setObject:(id<CKRecordValue>)object forKeyedSubscript:(NSString *)key
To
- (void)setObject:(__kindof id<CKRecordValue> _Nullable)object forKeyedSubscript:(NSString * _Nonnull)key

CKSubscription.h

Declaration
From
@property(nonatomic, copy) NSArray *alertLocalizationArgs
To
@property(nonatomic, copy, nullable) NSArray<NSString *> *alertLocalizationArgs

Declaration
From
@property(nonatomic, copy) NSArray *desiredKeys
To
@property(nonatomic, copy, nullable) NSArray<NSString *> *desiredKeys