-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCloudKit.framework.h
More file actions
2888 lines (2279 loc) · 139 KB
/
CloudKit.framework.h
File metadata and controls
2888 lines (2279 loc) · 139 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// ========== CloudKit.framework/Headers/CKDatabase.h
//
// CKDatabase.h
// CloudKit
//
// Copyright (c) 2014 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CloudKit/CKSubscription.h>
@class CKDatabaseOperation, CKRecord, CKRecordID, CKRecordZone, CKRecordZoneID, CKQuery;
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, CKDatabaseScope) {
CKDatabaseScopePublic = 1,
CKDatabaseScopePrivate,
CKDatabaseScopeShared,
} API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0));
API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0))
@interface CKDatabase : NSObject
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
- (void)addOperation:(CKDatabaseOperation *)operation;
@property (nonatomic, readonly, assign) CKDatabaseScope databaseScope API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0));
@end
/*! @abstract Convenience APIs
*
* @discussion These calls operate on a single item in the default zone and allow for simple operations.
* If you'd like to batch your requests, add dependencies between requests, set priorities, or schedule operations on your own queue, take a look at the corresponding `CKOperation`.
* This work is treated as having `NSQualityOfServiceUserInitiated` quality of service.
*/
@interface CKDatabase (ConvenienceMethods)
#pragma mark Record Convenience Methods
/*! `CKFetchRecordsOperation` and `CKModifyRecordsOperation` are the more configurable, `CKOperation`-based alternatives to these methods */
- (void)fetchRecordWithID:(CKRecordID *)recordID completionHandler:(void (^)(CKRecord * _Nullable record, NSError * _Nullable error))completionHandler;
- (void)saveRecord:(CKRecord *)record completionHandler:(void (^)(CKRecord * _Nullable record, NSError * _Nullable error))completionHandler;
- (void)deleteRecordWithID:(CKRecordID *)recordID completionHandler:(void (^)(CKRecordID * _Nullable recordID, NSError * _Nullable error))completionHandler;
#pragma mark Query Convenience Method
/*! @discussion `CKQueryOperation` is the more configurable, `CKOperation`-based alternative to this method
* Queries can potentially return a large number of records, and the server will return those records in batches. This convenience API will only fetch the first batch of results (equivalent to using `CKQueryOperationMaximumResults`).
* If you would like to fetch all results, use `CKQueryOperation` and its `CKQueryCursor` instead.
* Queries invoked within a `sharedCloudDatabase` must specify a `zoneID`. Cross-zone queries are not supported in a `sharedCloudDatabase`
*/
- (void)performQuery:(CKQuery *)query inZoneWithID:(nullable CKRecordZoneID *)zoneID completionHandler:(void (^)(NSArray<CKRecord *> * _Nullable results, NSError * _Nullable error))completionHandler;
#pragma mark Record Zone Convenience Methods
/*! `CKFetchRecordZonesOperation` and `CKModifyRecordZonesOperation` are the more configurable, `CKOperation`-based alternatives to these methods */
- (void)fetchAllRecordZonesWithCompletionHandler:(void (^)(NSArray<CKRecordZone *> * _Nullable zones, NSError * _Nullable error))completionHandler;
- (void)fetchRecordZoneWithID:(CKRecordZoneID *)zoneID completionHandler:(void (^)(CKRecordZone * _Nullable zone, NSError * _Nullable error))completionHandler;
- (void)saveRecordZone:(CKRecordZone *)zone completionHandler:(void (^)(CKRecordZone * _Nullable zone, NSError * _Nullable error))completionHandler;
- (void)deleteRecordZoneWithID:(CKRecordZoneID *)zoneID completionHandler:(void (^)(CKRecordZoneID * _Nullable zoneID, NSError * _Nullable error))completionHandler;
#pragma mark Subscription Convenience Methods
/*! `CKFetchSubscriptionsOperation` and `CKModifySubscriptionsOperation` are the more configurable, `CKOperation`-based alternative to these methods */
- (void)fetchSubscriptionWithID:(CKSubscriptionID)subscriptionID completionHandler:(void (^)(CKSubscription * _Nullable subscription, NSError * _Nullable error))completionHandler API_AVAILABLE(macos(10.10), ios(8.0), tvos(9.0), watchos(6.0));
- (void)fetchAllSubscriptionsWithCompletionHandler:(void (^)(NSArray<CKSubscription *> * _Nullable subscriptions, NSError * _Nullable error))completionHandler API_AVAILABLE(macos(10.10), ios(8.0), tvos(9.0), watchos(6.0));
- (void)saveSubscription:(CKSubscription *)subscription completionHandler:(void (^)(CKSubscription * _Nullable subscription, NSError * _Nullable error))completionHandler API_AVAILABLE(macos(10.10), ios(8.0), tvos(9.0), watchos(6.0));
- (void)deleteSubscriptionWithID:(CKSubscriptionID)subscriptionID completionHandler:(void (^)(NSString * _Nullable subscriptionID, NSError * _Nullable error))completionHandler API_AVAILABLE(macos(10.10), ios(8.0), tvos(9.0), watchos(6.0));
@end
NS_ASSUME_NONNULL_END
// ========== CloudKit.framework/Headers/CKFetchSubscriptionsOperation.h
//
// CKFetchSubscriptionsOperation.h
// CloudKit
//
// Copyright (c) 2014 Apple Inc. All rights reserved.
//
#import <CloudKit/CKDatabaseOperation.h>
#import <CloudKit/CKDefines.h>
#import <CloudKit/CKSubscription.h>
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.10), ios(8.0), watchos(6.0))
@interface CKFetchSubscriptionsOperation : CKDatabaseOperation
+ (instancetype)fetchAllSubscriptionsOperation;
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithSubscriptionIDs:(NSArray<CKSubscriptionID> *)subscriptionIDs;
@property (nonatomic, copy, nullable) NSArray<CKSubscriptionID> *subscriptionIDs;
/*! @abstract This block is called when the operation completes.
*
* @discussion The [NSOperation completionBlock] will also be called if both are set.
* If the error is `CKErrorPartialFailure`, the error's userInfo dictionary contains a dictionary of subscriptionID to errors keyed off of `CKPartialErrorsByItemIDKey`.
*/
@property (nonatomic, copy, nullable) void (^fetchSubscriptionCompletionBlock)(NSDictionary<CKSubscriptionID, CKSubscription *> * _Nullable subscriptionsBySubscriptionID, NSError * _Nullable operationError);
@end
NS_ASSUME_NONNULL_END
// ========== CloudKit.framework/Headers/CKDiscoverUserIdentitiesOperation.h
//
// CKDiscoverUserIdentitiesOperation.h
// CloudKit
//
// Copyright (c) 2016 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CloudKit/CKOperation.h>
@class CKRecordID, CKUserIdentity, CKUserIdentityLookupInfo;
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0))
@interface CKDiscoverUserIdentitiesOperation : CKOperation
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithUserIdentityLookupInfos:(NSArray<CKUserIdentityLookupInfo *> *)userIdentityLookupInfos;
@property (nonatomic, copy) NSArray<CKUserIdentityLookupInfo *> *userIdentityLookupInfos;
@property (nonatomic, copy, nullable) void (^userIdentityDiscoveredBlock)(CKUserIdentity *identity, CKUserIdentityLookupInfo * lookupInfo);
/*! @abstract This block is called when the operation completes.
*
* @discussion The [NSOperation completionBlock] will also be called if both are set.
*/
@property (nonatomic, copy, nullable) void (^discoverUserIdentitiesCompletionBlock)(NSError * _Nullable operationError);
@end
NS_ASSUME_NONNULL_END
// ========== CloudKit.framework/Headers/CKError.h
//
// CKError.h
// CloudKit
//
// Copyright (c) 2014 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CloudKit/CKDefines.h>
NS_ASSUME_NONNULL_BEGIN
CK_EXTERN NSString * const CKErrorDomain API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0));
/*! @abstract When a CKErrorPartialFailure happens this key will be set in the error's userInfo dictionary.
*
* @discussion The value of this key will be a dictionary, and the values will be errors for individual items with the keys being the item IDs that failed.
*/
CK_EXTERN NSString * const CKPartialErrorsByItemIDKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0));
/*! If the server rejects a record save because it has been modified since the last time it was read, a `CKErrorServerRecordChanged` error will be returned and it will contain versions of the record in its userInfo dictionary. Apply your custom conflict resolution logic to the server record under `CKServerRecordKey` and attempt a save of that record. */
CK_EXTERN NSString * const CKRecordChangedErrorAncestorRecordKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0));
CK_EXTERN NSString * const CKRecordChangedErrorServerRecordKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0));
CK_EXTERN NSString * const CKRecordChangedErrorClientRecordKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0));
/*! On some errors, the userInfo dictionary may contain a NSNumber instance that specifies the period of time in seconds after which the client may retry the request. For example, this key will be on `CKErrorServiceUnavailable`, `CKErrorRequestRateLimited`, and other errors for which the recommended resolution is to retry after a delay.
*/
CK_EXTERN NSString * const CKErrorRetryAfterKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0));
typedef NS_ENUM(NSInteger, CKErrorCode) {
/*! CloudKit.framework encountered an error. This is a non-recoverable error. */ CKErrorInternalError = 1,
/*! Some items failed, but the operation succeeded overall. Check CKPartialErrorsByItemIDKey in the userInfo dictionary for more details. */
CKErrorPartialFailure = 2,
/*! Network not available */
CKErrorNetworkUnavailable = 3,
/*! Network error (available but CFNetwork gave us an error) */
CKErrorNetworkFailure = 4,
/*! Un-provisioned or unauthorized container. Try provisioning the container before retrying the operation. */
CKErrorBadContainer = 5,
/*! Service unavailable */
CKErrorServiceUnavailable = 6,
/*! Client is being rate limited */
CKErrorRequestRateLimited = 7,
/*! Missing entitlement */
CKErrorMissingEntitlement = 8,
/*! Not authenticated (writing without being logged in, no user record) */
CKErrorNotAuthenticated = 9,
/*! Access failure (save, fetch, or shareAccept) */
CKErrorPermissionFailure = 10,
/*! Record does not exist */
CKErrorUnknownItem = 11,
/*! Bad client request (bad record graph, malformed predicate) */
CKErrorInvalidArguments = 12,
CKErrorResultsTruncated API_DEPRECATED("Will not be returned", macos(10.10, 10.12), ios(8.0, 10.0), tvos(9.0, 10.0), watchos(3.0, 3.0)) = 13,
/*! The record was rejected because the version on the server was different */
CKErrorServerRecordChanged = 14,
/*! The server rejected this request. This is a non-recoverable error */
CKErrorServerRejectedRequest = 15,
/*! Asset file was not found */
CKErrorAssetFileNotFound = 16,
/*! Asset file content was modified while being saved */
CKErrorAssetFileModified = 17,
/*! App version is less than the minimum allowed version */
CKErrorIncompatibleVersion = 18,
/*! The server rejected the request because there was a conflict with a unique field. */
CKErrorConstraintViolation = 19,
/*! A CKOperation was explicitly cancelled */
CKErrorOperationCancelled = 20,
/*! The previousServerChangeToken value is too old and the client must re-sync from scratch */
CKErrorChangeTokenExpired = 21,
/*! One of the items in this batch operation failed in a zone with atomic updates, so the entire batch was rejected. */
CKErrorBatchRequestFailed = 22,
/*! The server is too busy to handle this zone operation. Try the operation again in a few seconds. */
CKErrorZoneBusy = 23,
/*! Operation could not be completed on the given database. Likely caused by attempting to modify zones in the public database. */
CKErrorBadDatabase = 24,
/*! Saving a record would exceed quota */
CKErrorQuotaExceeded = 25,
/*! The specified zone does not exist on the server */
CKErrorZoneNotFound = 26,
/*! The request to the server was too large. Retry this request as a smaller batch. */
CKErrorLimitExceeded = 27,
/*! The user deleted this zone through the settings UI. Your client should either remove its local data or prompt the user before attempting to re-upload any data to this zone. */
CKErrorUserDeletedZone = 28,
/*! A share cannot be saved because there are too many participants attached to the share */
CKErrorTooManyParticipants API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0)) = 29,
/*! A record/share cannot be saved, doing so would cause a hierarchy of records to exist in multiple shares */
CKErrorAlreadyShared API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0)) = 30,
/*! The target of a record's parent or share reference was not found */
CKErrorReferenceViolation API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0)) = 31,
/*! Request was rejected due to a managed account restriction */
CKErrorManagedAccountRestricted API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0)) = 32,
/*! Share Metadata cannot be determined, because the user is not a member of the share. There are invited participants on the share with email addresses or phone numbers not associated with any iCloud account. The user may be able to join the share if they can associate one of those email addresses or phone numbers with their iCloud account via the system Share Accept UI. Call UIApplication's openURL on this share URL to have the user attempt to verify their information. */
CKErrorParticipantMayNeedVerification API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0)) = 33,
/*! The server received and processed this request, but the response was lost due to a network failure. There is no guarantee that this request succeeded. Your client should re-issue the request (if it is idempotent), or fetch data from the server to determine if the request succeeded. */
CKErrorServerResponseLost API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 34,
/*! The file for this asset could not be accessed. It is likely your application does not have permission to open the file, or the file may be temporarily unavailable due to its data protection class. This operation can be retried after it is able to be opened in your process. */
CKErrorAssetNotAvailable API_AVAILABLE(macos(10.13), ios(11.3), tvos(11.3), watchos(4.3)) = 35,
} API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0));
NS_ASSUME_NONNULL_END
// ========== CloudKit.framework/Headers/CKDiscoverUserInfosOperation.h
//
// CKDiscoverUserInfosOperation.h
// CloudKit
//
// Copyright (c) 2014 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CloudKit/CKOperation.h>
@class CKRecordID, CKDiscoveredUserInfo;
NS_ASSUME_NONNULL_BEGIN
API_DEPRECATED_WITH_REPLACEMENT("CKDiscoverUserIdentitiesOperation", macos(10.10, 10.12), ios(8.0, 10.0), tvos(9.0, 10.0), watchos(3.0, 3.0))
@interface CKDiscoverUserInfosOperation : CKOperation
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithEmailAddresses:(nullable NSArray<NSString *> *)emailAddresses userRecordIDs:(nullable NSArray<CKRecordID *> *)userRecordIDs;
@property (nonatomic, copy, nullable) NSArray<NSString *> *emailAddresses;
@property (nonatomic, copy, nullable) NSArray<CKRecordID *> *userRecordIDs;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
/*! @abstract This block is called when the operation completes.
*
* @discussion The [NSOperation completionBlock] will also be called if both are set.
*/
@property (nonatomic, copy, nullable) void (^discoverUserInfosCompletionBlock)(NSDictionary<NSString *, CKDiscoveredUserInfo *> * _Nullable emailsToUserInfos, NSDictionary<CKRecordID *, CKDiscoveredUserInfo *> * _Nullable userRecordIDsToUserInfos, NSError * _Nullable operationError);
#pragma clang diagnostic pop
@end
NS_ASSUME_NONNULL_END
// ========== CloudKit.framework/Headers/CKNotification.h
//
// CKNotification.h
// CloudKit
//
// Copyright (c) 2014 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CloudKit/CKRecord.h>
#import <CloudKit/CKDatabase.h>
@class CKRecordID, CKRecordZoneID;
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0))
@interface CKNotificationID : NSObject <NSCopying, NSSecureCoding>
@end
/*! @enum CKNotificationType
*
* @constant CKNotificationTypeQuery Generated by `CKQuerySubscriptions`
* @constant CKNotificationTypeRecordZone Generated by `CKRecordZoneSubscriptions`
* @constant CKNotificationTypeReadNotification Indicates a notification that a client had previously marked as read
* @constant CKNotificationTypeDatabase Generated by `CKDatabaseSubscriptions`
*/
typedef NS_ENUM(NSInteger, CKNotificationType) {
CKNotificationTypeQuery = 1,
CKNotificationTypeRecordZone = 2,
CKNotificationTypeReadNotification = 3,
CKNotificationTypeDatabase API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0)) = 4,
} API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0));
API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0))
@interface CKNotification : NSObject
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
+ (nullable instancetype)notificationFromRemoteNotificationDictionary:(NSDictionary *)notificationDictionary;
/*! When you instantiate a CKNotification from a remote notification dictionary, you will get back a concrete
subclass defined below. Use notificationType to avoid -isKindOfClass: checks */
@property (nonatomic, readonly, assign) CKNotificationType notificationType;
@property (nonatomic, readonly, copy, nullable) CKNotificationID *notificationID;
@property (nonatomic, readonly, copy, nullable) NSString *containerIdentifier;
/*! @abstract Whether or not the notification fully represents what the server wanted to send.
*
* @discussion Push notifications have a limited size. In some cases, CloudKit servers may not be able to send you a full `CKNotification`'s worth of info in one push. In those cases, isPruned returns YES. The order in which we'll drop properties is defined in each `CKNotification` subclass below.
* The `CKNotification` can be obtained in full via a `CKFetchNotificationChangesOperation`
*/
@property (nonatomic, readonly, assign) BOOL isPruned;
/*! @discussion
* These keys are parsed out of the 'aps' payload from a remote notification dictionary.
* On tvOS, alerts, badges, sounds, and categories are not handled in push notifications.
*/
/*! Optional alert string to display in a push notification. */
@property (nonatomic, readonly, copy, nullable) NSString *alertBody __TVOS_PROHIBITED;
/*! Instead of a raw alert string, you may optionally specify a key for a localized string in your app's Localizable.strings file. */
@property (nonatomic, readonly, copy, nullable) NSString *alertLocalizationKey __TVOS_PROHIBITED;
/*! A list of field names to take from the matching record that is used as substitution variables in a formatted alert string. */
@property (nonatomic, readonly, copy, nullable) NSArray<NSString *> *alertLocalizationArgs __TVOS_PROHIBITED;
/*! Optional title of the alert to display in a push notification. */
@property (nonatomic, readonly, copy, nullable) NSString *title API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0)) __TVOS_PROHIBITED;
/*! Instead of a raw title string, you may optionally specify a key for a localized string in your app's Localizable.strings file. */
@property (nonatomic, readonly, copy, nullable) NSString *titleLocalizationKey API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0)) __TVOS_PROHIBITED;
/*! A list of field names to take from the matching record that is used as substitution variables in a formatted title string. */
@property (nonatomic, readonly, copy, nullable) NSArray<NSString *> *titleLocalizationArgs API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0)) __TVOS_PROHIBITED;
/*! Optional subtitle of the alert to display in a push notification. */
@property (nonatomic, readonly, copy, nullable) NSString *subtitle API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0)) __TVOS_PROHIBITED;
/*! Instead of a raw subtitle string, you may optionally specify a key for a localized string in your app's Localizable.strings file. */
@property (nonatomic, readonly, copy, nullable) NSString *subtitleLocalizationKey API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0)) __TVOS_PROHIBITED;
/*! A list of field names to take from the matching record that is used as substitution variables in a formatted subtitle string. */
@property (nonatomic, readonly, copy, nullable) NSArray<NSString *> *subtitleLocalizationArgs API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0)) __TVOS_PROHIBITED;
/*! A key for a localized string to be used as the alert action in a modal style notification. */
@property (nonatomic, readonly, copy, nullable) NSString *alertActionLocalizationKey __TVOS_PROHIBITED;
/*! The name of an image in your app bundle to be used as the launch image when launching in response to the notification. */
@property (nonatomic, readonly, copy, nullable) NSString *alertLaunchImage __TVOS_PROHIBITED;
/*! The number to display as the badge of the application icon */
@property (nonatomic, readonly, copy, nullable) NSNumber *badge API_AVAILABLE(tvos(10.0));
/*! The name of a sound file in your app bundle to play upon receiving the notification. */
@property (nonatomic, readonly, copy, nullable) NSString *soundName __TVOS_PROHIBITED;
/*! The ID of the subscription that caused this notification to fire */
@property (nonatomic, readonly, copy, nullable) CKSubscriptionID subscriptionID API_AVAILABLE(macos(10.11), ios(9.0), watchos(3.0));
/*! The category for user-initiated actions in the notification */
@property (nonatomic, readonly, copy, nullable) NSString *category API_AVAILABLE(macos(10.11), ios(9.0), watchos(3.0)) __TVOS_PROHIBITED;
@end
typedef NS_ENUM(NSInteger, CKQueryNotificationReason) {
CKQueryNotificationReasonRecordCreated = 1,
CKQueryNotificationReasonRecordUpdated,
CKQueryNotificationReasonRecordDeleted,
} API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0));
/*! @class CKQueryNotification
*
* @discussion `notificationType` == `CKNotificationTypeQuery`
* When properties must be dropped (see `isPruned`), here's the order of importance. The most important properties are first, they'll be the last ones to be dropped.
* - notificationID
* - badge
* - alertLocalizationKey
* - alertLocalizationArgs
* - alertBody
* - alertActionLocalizationKey
* - alertLaunchImage
* - soundName
* - content-available
* - desiredKeys
* - queryNotificationReason
* - recordID
* - containerIdentifier
* - titleLocalizationKey
* - titleLocalizationArgs
* - title
* - subtitleLocalizationKey
* - subtitleLocalizationArgs
* - subtitle
*/
API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0))
@interface CKQueryNotification : CKNotification
@property (nonatomic, readonly, assign) CKQueryNotificationReason queryNotificationReason;
/*! @abstract A set of key->value pairs for creates and updates.
*
* @discussion You request the server fill out this property via the `desiredKeys` property of `CKNotificationInfo`
*/
@property (nonatomic, readonly, copy, nullable) NSDictionary<NSString *, id> *recordFields;
@property (nonatomic, readonly, copy, nullable) CKRecordID *recordID;
/*! If YES, this record is in the public database. Else, it's in the private database */
@property (nonatomic, readonly, assign) BOOL isPublicDatabase API_DEPRECATED("Use databaseScope instead", macos(10.10, 10.12), ios(8.0, 10.0), tvos(9.0, 10.0), watchos(3.0, 3.0));
@property (nonatomic, readonly, assign) CKDatabaseScope databaseScope API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0));
@end
/*! @class CKRecordZoneNotification
*
* @discussion `notificationType` == `CKNotificationTypeRecordZone`
* When properties must be dropped (see `isPruned`), here's the order of importance. The most important properties are first, they'll be the last ones to be dropped.
* - notificationID
* - badge
* - alertLocalizationKey
* - alertLocalizationArgs
* - alertBody
* - alertActionLocalizationKey
* - alertLaunchImage
* - soundName
* - content-available
* - recordZoneID
* - containerIdentifier
* - titleLocalizationKey
* - titleLocalizationArgs
* - title
* - subtitleLocalizationKey
* - subtitleLocalizationArgs
* - subtitle
*/
API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0))
@interface CKRecordZoneNotification : CKNotification
@property (nonatomic, readonly, copy, nullable) CKRecordZoneID *recordZoneID;
@property (nonatomic, readonly, assign) CKDatabaseScope databaseScope API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0));
@end
/*! @class CKDatabaseNotification
*
* @discussion `notificationType` == `CKNotificationTypeDatabase`
* When properties must be dropped (see `isPruned`), here's the order of importance. The most important properties are first, they'll be the last ones to be dropped.
* - notificationID
* - badge
* - alertLocalizationKey
* - alertLocalizationArgs
* - alertBody
* - alertActionLocalizationKey
* - alertLaunchImage
* - soundName
* - content-available
* - containerIdentifier
* - titleLocalizationKey
* - titleLocalizationArgs
* - title
* - subtitleLocalizationKey
* - subtitleLocalizationArgs
* - subtitle
*/
API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0))
@interface CKDatabaseNotification : CKNotification
@property (nonatomic, readonly, assign) CKDatabaseScope databaseScope;
@end
NS_ASSUME_NONNULL_END
// ========== CloudKit.framework/Headers/CKServerChangeToken.h
//
// CKServerChangeToken.h
// CloudKit
//
// Copyright (c) 2014 Apple Inc. All rights reserved.
//
#import <CloudKit/CKDatabaseOperation.h>
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0))
@interface CKServerChangeToken : NSObject <NSCopying, NSSecureCoding>
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== CloudKit.framework/Headers/CKModifyRecordZonesOperation.h
//
// CKModifyRecordZonesOperation.h
// CloudKit
//
// Copyright (c) 2014 Apple Inc. All rights reserved.
//
#import <CloudKit/CKDatabaseOperation.h>
@class CKRecordZone, CKRecordZoneID;
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0))
@interface CKModifyRecordZonesOperation : CKDatabaseOperation
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithRecordZonesToSave:(nullable NSArray<CKRecordZone *> *)recordZonesToSave recordZoneIDsToDelete:(nullable NSArray<CKRecordZoneID *> *)recordZoneIDsToDelete;
@property (nonatomic, copy, nullable) NSArray<CKRecordZone *> *recordZonesToSave;
@property (nonatomic, copy, nullable) NSArray<CKRecordZoneID *> *recordZoneIDsToDelete;
/*! @abstract This block is called when the operation completes.
*
* @discussion The [NSOperation completionBlock] will also be called if both are set.
* If the error is `CKErrorPartialFailure`, the error's userInfo dictionary contains a dictionary of recordZoneIDs to errors keyed off of `CKPartialErrorsByItemIDKey`.
* This call happens as soon as the server has seen all record changes, and may be invoked while the server is processing the side effects of those changes.
*/
@property (nonatomic, copy, nullable) void (^modifyRecordZonesCompletionBlock)(NSArray<CKRecordZone *> * _Nullable savedRecordZones, NSArray<CKRecordZoneID *> * _Nullable deletedRecordZoneIDs, NSError * _Nullable operationError);
@end
NS_ASSUME_NONNULL_END
// ========== CloudKit.framework/Headers/CKQuery.h
//
// CKQuery.h
// CloudKit
//
// Copyright (c) 2014 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CloudKit/CKRecord.h>
NS_ASSUME_NONNULL_BEGIN
/*! @class CKQuery
*
* @discussion Only AND compound predicates are allowed.
*
* Key names must begin with either an upper or lower case character ([a-zA-Z]) and may be followed by characters, numbers, or underscores ([0-9a-zA-Z_]). Keypaths may only resolve to the currently evaluated object, so the '.' character is not allowed in key names.
*
* A limited subset of classes are allowed as predicate arguments:
* - NSString
* - NSDate
* - NSData
* - NSNumber
* - NSArray
* - CKReference
* - CKRecord
* - CLLocation
*
* Any other class as an argument will result in an error when executing the query.
*/
API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0))
@interface CKQuery : NSObject <NSSecureCoding, NSCopying>
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;
/*! Use `[NSPredicate predicateWithValue:YES]` / `NSPredicate(value: true)` if you want to query for all records of a given type. */
- (instancetype)initWithRecordType:(CKRecordType)recordType predicate:(NSPredicate *)predicate NS_DESIGNATED_INITIALIZER;
@property (nonatomic, readonly, copy) CKRecordType recordType;
@property (nonatomic, readonly, copy) NSPredicate *predicate;
@property (nonatomic, copy, nullable) NSArray<NSSortDescriptor *> *sortDescriptors;
@end
NS_ASSUME_NONNULL_END
// ========== CloudKit.framework/Headers/CKFetchNotificationChangesOperation.h
//
// CKFetchNotificationChangesOperation.h
// CloudKit
//
// Copyright (c) 2014 Apple Inc. All rights reserved.
//
#import <CloudKit/CKDatabaseOperation.h>
@class CKNotification, CKServerChangeToken;
NS_ASSUME_NONNULL_BEGIN
/*! @class CKFetchNotificationChangesOperation
*
* @abstract An operation that fetches all notification changes.
*
* @discussion If a change token from a previous `CKFetchNotificationChangesOperation` is passed in, only the notifications that have changed since that token will be fetched.
* If this is your first fetch, pass nil for the change token.
* Change tokens are opaque tokens and clients should not infer any behavior based on their content.
*/
API_DEPRECATED("Instead of iterating notifications to enumerate changed record zones, use CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation", macos(10.10, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0))
@interface CKFetchNotificationChangesOperation : CKOperation
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithPreviousServerChangeToken:(nullable CKServerChangeToken *)previousServerChangeToken;
@property (nonatomic, copy, nullable) CKServerChangeToken *previousServerChangeToken;
@property (nonatomic, assign) NSUInteger resultsLimit;
/*! @abstract If true, then the server wasn't able to return all the changes in this response.
*
* @discussion Will be set before `fetchNotificationChangesCompletionBlock` is called.
* Another `CKFetchNotificationChangesOperation` operation should be run with the updated `serverChangeToken` token from this operation.
*/
@property (nonatomic, readonly) BOOL moreComing;
@property (nonatomic, copy, nullable) void (^notificationChangedBlock)(CKNotification *notification);
/*! @abstract This block is called when the operation completes.
*
* @discussion Clients are responsible for saving the change token at the end of the operation and passing it in to the next call to `CKFetchNotificationChangesOperation`.
* Note that a fetch can fail partway. If that happens, an updated change token may be returned in the completion block so that already fetched notifications don't need to be re-downloaded on a subsequent operation.
* If the server returns a `CKErrorChangeTokenExpired` error, the `previousServerChangeToken` value was too old and the client should toss its local cache and re-fetch notification changes starting with a nil `previousServerChangeToken`.
*/
@property (nonatomic, copy, nullable) void (^fetchNotificationChangesCompletionBlock)(CKServerChangeToken * _Nullable serverChangeToken, NSError * _Nullable operationError);
@end
NS_ASSUME_NONNULL_END
// ========== CloudKit.framework/Headers/CloudKit.h
//
// CloudKit.h
// CloudKit
//
// Copyright (c) 2014 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CloudKit/CKDefines.h>
#import <CloudKit/CKContainer.h>
#import <CloudKit/CKAsset.h>
#import <CloudKit/CKDatabase.h>
#import <CloudKit/CKError.h>
#import <CloudKit/CKLocationSortDescriptor.h>
#import <CloudKit/CKNotification.h>
#import <CloudKit/CKQuery.h>
#import <CloudKit/CKRecordZone.h>
#import <CloudKit/CKRecord.h>
#import <CloudKit/CKRecordID.h>
#import <CloudKit/CKRecordZoneID.h>
#import <CloudKit/CKReference.h>
#import <CloudKit/CKServerChangeToken.h>
#import <CloudKit/CKShare.h>
#import <CloudKit/CKShareMetadata.h>
#import <CloudKit/CKShareParticipant.h>
#import <CloudKit/CKSubscription.h>
#import <CloudKit/CKDiscoveredUserInfo.h>
#import <CloudKit/CKUserIdentity.h>
#import <CloudKit/CKUserIdentityLookupInfo.h>
#import <CloudKit/CKOperationGroup.h>
#import <CloudKit/CKOperation.h>
#import <CloudKit/CKDatabaseOperation.h>
#import <CloudKit/CKModifyRecordsOperation.h>
#import <CloudKit/CKFetchRecordsOperation.h>
#import <CloudKit/CKFetchRecordChangesOperation.h>
#import <CloudKit/CKFetchRecordZoneChangesOperation.h>
#import <CloudKit/CKQueryOperation.h>
#import <CloudKit/CKModifyBadgeOperation.h>
#import <CloudKit/CKFetchNotificationChangesOperation.h>
#import <CloudKit/CKMarkNotificationsReadOperation.h>
#import <CloudKit/CKFetchSubscriptionsOperation.h>
#import <CloudKit/CKModifySubscriptionsOperation.h>
#import <CloudKit/CKModifyRecordZonesOperation.h>
#import <CloudKit/CKFetchRecordZonesOperation.h>
#import <CloudKit/CKFetchWebAuthTokenOperation.h>
#import <CloudKit/CKDiscoverUserInfosOperation.h>
#import <CloudKit/CKDiscoverAllContactsOperation.h>
#import <CloudKit/CKDiscoverUserIdentitiesOperation.h>
#import <CloudKit/CKDiscoverAllUserIdentitiesOperation.h>
#import <CloudKit/CKFetchShareParticipantsOperation.h>
#import <CloudKit/CKAcceptSharesOperation.h>
#import <CloudKit/CKFetchShareMetadataOperation.h>
#import <CloudKit/CKFetchDatabaseChangesOperation.h>
// ========== CloudKit.framework/Headers/CKFetchShareMetadataOperation.h
//
// CKFetchShareMetadataOperation.h
// CloudKit
//
// Copyright © 2016 Apple Inc. All rights reserved.
//
#import <CloudKit/CKOperation.h>
#import <CloudKit/CKRecord.h>
@class CKShareMetadata, CKFetchShareMetadataOptions;
NS_ASSUME_NONNULL_BEGIN
/*! @class CKFetchShareMetadataOperation
*
* @abstract Fetch the `CKShareMetadata` for a share URL.
*
* @discussion Since you can't know what container this share is in before you fetch its metadata, you may run this operation in any container you have access to
*/
API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0))
@interface CKFetchShareMetadataOperation : CKOperation
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithShareURLs:(NSArray<NSURL *> *)shareURLs;
@property (nonatomic, copy, nullable) NSArray<NSURL *> *shareURLs;
/*! @abstract If set to YES, the resulting `CKShareMetadata` will have a `rootRecord` object filled out.
*
* @discussion Defaults to NO.
* The resulting `CKShareMetadata` will have a `rootRecordID` property regardless of the value of this property.
*/
@property (nonatomic, assign) BOOL shouldFetchRootRecord;
/*! @abstract Declares which user-defined keys should be fetched and added to the resulting `rootRecord`.
*
* @discussion Only consulted if `shouldFetchRootRecord` is YES.
* If nil, declares the entire root record should be downloaded. If set to an empty array, declares that no user fields should be downloaded.
* Defaults to nil.
*/
@property (nonatomic, copy, nullable) NSArray<CKRecordFieldKey> *rootRecordDesiredKeys;
@property (nonatomic, copy, nullable) void (^perShareMetadataBlock)(NSURL *shareURL, CKShareMetadata * _Nullable shareMetadata, NSError * _Nullable error);
@property (nonatomic, copy, nullable) void (^fetchShareMetadataCompletionBlock)(NSError * _Nullable operationError);
@end
NS_ASSUME_NONNULL_END
// ========== CloudKit.framework/Headers/CKMarkNotificationsReadOperation.h
//
// CKMarkNotificationsReadOperation.h
// CloudKit
//
// Copyright (c) 2014 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CloudKit/CKOperation.h>
@class CKNotificationID;
NS_ASSUME_NONNULL_BEGIN
API_DEPRECATED("Instead of iterating notifications, consider using CKDatabaseSubscription, CKFetchDatabaseChangesOperation, and CKFetchRecordZoneChangesOperation as appropriate", macos(10.10, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0))
@interface CKMarkNotificationsReadOperation : CKOperation
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithNotificationIDsToMarkRead:(NSArray<CKNotificationID *> *)notificationIDs;
@property (nonatomic, copy, nullable) NSArray<CKNotificationID *> *notificationIDs;
@property (nonatomic, copy, nullable) void (^markNotificationsReadCompletionBlock)(NSArray<CKNotificationID *> * _Nullable notificationIDsMarkedRead, NSError * _Nullable operationError);
@end
NS_ASSUME_NONNULL_END
// ========== CloudKit.framework/Headers/CKReference.h
//
// CKReference.h
// CloudKit
//
// Copyright (c) 2014 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@class CKRecord, CKRecordID, CKAsset;
NS_ASSUME_NONNULL_BEGIN
/*! @enum CKReferenceAction
* @constant CKReferenceActionNone When the referred record is deleted, this record is unchanged, and has a dangling pointer
* @constant CKReferenceActionDeleteSelf When the referred record is deleted then this record is also deleted
*/
typedef NS_ENUM(NSUInteger, CKReferenceAction) {
CKReferenceActionNone = 0,
CKReferenceActionDeleteSelf = 1,
} API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0));
API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0))
@interface CKReference : NSObject <NSSecureCoding, NSCopying>
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
/*! @discussion It is acceptable to relate two records that have not yet been uploaded to the server, but those records must be uploaded to the server in the same operation.
*
* If a record references a record that does not exist on the server and is not in the current save operation it will result in an error.
*/
- (instancetype)initWithRecordID:(CKRecordID *)recordID action:(CKReferenceAction)action NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithRecord:(CKRecord *)record action:(CKReferenceAction)action;
@property (nonatomic, readonly, assign) CKReferenceAction referenceAction;
@property (nonatomic, readonly, copy) CKRecordID *recordID;
@end
NS_ASSUME_NONNULL_END
// ========== CloudKit.framework/Headers/CKShareParticipant.h
//
// CKShareParticipant.h
// CloudKit
//
// Copyright (c) 2016 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@class CKUserIdentity;
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, CKShareParticipantAcceptanceStatus) {
CKShareParticipantAcceptanceStatusUnknown,
CKShareParticipantAcceptanceStatusPending,
CKShareParticipantAcceptanceStatusAccepted,
CKShareParticipantAcceptanceStatusRemoved,
} API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0));
/*! These permissions determine what share participants can do with records inside that share */
typedef NS_ENUM(NSInteger, CKShareParticipantPermission) {
CKShareParticipantPermissionUnknown,
CKShareParticipantPermissionNone,
CKShareParticipantPermissionReadOnly,
CKShareParticipantPermissionReadWrite,
} API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0));
/*! @abstract The participant type determines whether a participant can modify the list of participants on a share.
*
* @discussion
* - Owners can add private users
* - Private users can access the share
* - Public users are "self-added" when the participant accesses the shareURL. Owners cannot add public users.
*/
typedef NS_ENUM(NSInteger, CKShareParticipantRole) {
CKShareParticipantRoleUnknown = 0,
CKShareParticipantRoleOwner = 1,
CKShareParticipantRolePrivateUser = 3,
CKShareParticipantRolePublicUser = 4,
} API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0));
typedef NS_ENUM(NSInteger, CKShareParticipantType) {
CKShareParticipantTypeUnknown = 0,
CKShareParticipantTypeOwner = 1,
CKShareParticipantTypePrivateUser = 3,
CKShareParticipantTypePublicUser = 4,
} API_DEPRECATED_WITH_REPLACEMENT("CKShareParticipantRole", macos(10.12, 10.14), ios(10.0, 12.0), tvos(10.0, 12.0), watchos(3.0, 5.0));
API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0))
@interface CKShareParticipant : NSObject <NSSecureCoding, NSCopying>
/*! Use `CKFetchShareParticipantsOperation` to create a `CKShareParticipant` object */
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
@property (nonatomic, readonly, strong) CKUserIdentity *userIdentity;
/*! The default participant role is `CKShareParticipantRolePrivateUser`. */
@property (nonatomic, assign) CKShareParticipantRole role API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0));
/*! The default participant type is `CKShareParticipantTypePrivateUser`. */
@property (nonatomic, assign) CKShareParticipantType type API_DEPRECATED_WITH_REPLACEMENT("role", macos(10.12, 10.14), ios(10.0, 12.0), tvos(10.0, 12.0), watchos(3.0, 5.0));
@property (nonatomic, readonly, assign) CKShareParticipantAcceptanceStatus acceptanceStatus;
/*! The default permission for a new participant is `CKShareParticipantPermissionReadOnly`. */
@property (nonatomic, assign) CKShareParticipantPermission permission;
@end
NS_ASSUME_NONNULL_END
// ========== CloudKit.framework/Headers/CKOperation.h
//
// CKOperation.h
// CloudKit
//
// Copyright (c) 2014 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CloudKit/CKDefines.h>
@class CKContainer, CKOperationConfiguration, CKOperationGroup;
NS_ASSUME_NONNULL_BEGIN
typedef NSString *CKOperationID;
API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0))
@interface CKOperation : NSOperation
- (instancetype)init NS_DESIGNATED_INITIALIZER;
/*! @abstract This defines per-operation configuration settings.
*
* @discussion See the CKOperationConfiguration class description for info on how this configuration composes with CKOperationGroup.defaultConfiguration
*/
@property (nonatomic, copy, null_resettable) CKOperationConfiguration *configuration API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*! @abstract The group this operation is associated with
*/
@property (nonatomic, strong, nullable) CKOperationGroup *group API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*! @abstract This is an identifier unique to this CKOperation.
*
* @discussion This value is chosen by the system, and will be unique to this instance of a CKOperation. This identifier will be sent to Apple's servers, and can be used to identify any server-side logging associated with this operation.
*/
@property (nonatomic, readonly, copy) CKOperationID operationID API_AVAILABLE(macos(10.12), ios(9.3), tvos(9.2), watchos(3.0));
/*! @abstract This callback is called after a long lived operation has begun running and is persisted.
*
* @discussion Once this callback is called the operation will continue running even if the current process exits.
*/
@property (nonatomic, strong, nullable) void (^longLivedOperationWasPersistedBlock)(void) API_AVAILABLE(macos(10.12), ios(9.3), tvos(9.2), watchos(3.0));
@end
/*! @class CKOperationConfiguration
*
* @discussion An operation configuration is a set of properties that describes how your operation should behave. All properties have a default value. When determining what properties to apply to an operation, we consult the operation's configuration property, as well as the operation->group->defaultConfiguration property. We combine them following these rules:
* Group Default Configuration Value | Operation Configuration Value | Value Applied To Operation
* -----------------------------------+-------------------------------+-----------------------------------------
* default value | default value | default value
* default value | explicit value | operation.configuration explicit value
* explicit value | default value | operation.group.defaultConfiguration explicit value
* explicit value | explicit value | operation.configuration explicit value
*
* For example:
* CKOperationGroup -> defaultConfiguration -> allowsCellularAccess explicitly set to NO
* + CKOperation -> configuration -> allowsCellularAccess has default value of YES
* = disallow cellular access
*
* CKOperationGroup -> defaultConfiguration -> allowsCellularAccess explicitly set to NO
* + CKOperation -> configuration -> allowsCellularAccess explicitly set to YES
* = allow cellular access
*/
API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
@interface CKOperationConfiguration : NSObject
/*! If no container is set, [CKContainer defaultContainer] is used */
@property (nonatomic, strong, nullable) CKContainer *container;
/*! @discussion CKOperations behave differently depending on how you set qualityOfService.
*
* Quality of Service | timeoutIntervalForResource | Network Error Behavior | Discretionary Behavior
* -------------------+----------------------------+------------------------+-----------------------
* UserInteractive | -1 (no enforcement) | fail | nonDiscretionary
* UserInitiated | -1 (no enforcement) | fail | nonDiscretionary
* Default | 1 week | fail | discretionary when app backgrounded
* Utility | 1 week | internally retried | discretionary when app backgrounded
* Background | 1 week | internally retried | discretionary
*
* timeoutIntervalForResource
* - the timeout interval for any network resources retrieved by this operation