-
Notifications
You must be signed in to change notification settings - Fork 0
/
Contacts.framework.h
2223 lines (1781 loc) · 103 KB
/
Contacts.framework.h
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
// ========== Contacts.framework/Headers/CNGroup+Predicates.h
//
// CNGroup+Predicates.h
// Contacts
//
// Copyright (c) 2015 Apple Inc. All rights reserved.
//
#import <Contacts/CNGroup.h>
NS_ASSUME_NONNULL_BEGIN
/*!
* @abstract The predicates to match groups against.
*
* @discussion Can only use these predicates with CNContactStore.
*/
@interface CNGroup (Predicates)
+ (NSPredicate *)predicateForGroupsWithIdentifiers:(NSArray<NSString*> *)identifiers;
+ (NSPredicate *)predicateForSubgroupsInGroupWithIdentifier:(NSString *)parentGroupIdentifier NS_AVAILABLE(10_11, NA);
+ (NSPredicate *)predicateForGroupsInContainerWithIdentifier:(NSString *)containerIdentifier;
@end
NS_ASSUME_NONNULL_END
// ========== Contacts.framework/Headers/CNContactFormatter.h
//
// CNContactFormatter.h
// Contacts
//
// Copyright (c) 2015 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Contacts/ContactsDefines.h>
#import <Contacts/CNContact.h>
NS_ASSUME_NONNULL_BEGIN
/*!
* @abstract The formatting styles for contact names.
*/
typedef NS_ENUM(NSInteger, CNContactFormatterStyle)
{
/*! Combine the contact name components into a displayable full name. */
CNContactFormatterStyleFullName,
/*! Combine the contact phonetic name components into a displayable phonetic full name.*/
CNContactFormatterStylePhoneticFullName,
} NS_ENUM_AVAILABLE(10_11, 9_0);
/*!
* @abstract The formatting order of the contact name components.
*/
typedef NS_ENUM(NSInteger, CNContactDisplayNameOrder)
{
CNContactDisplayNameOrderUserDefault,
CNContactDisplayNameOrderGivenNameFirst,
CNContactDisplayNameOrderFamilyNameFirst,
} NS_ENUM_AVAILABLE(10_11, 9_0);
/*!
* @abstract Formats a contact name.
*
* @discussion This formatter handles international ordering and delimiting of the contact name components. This includes applying the user defaults when appropriate.
*/
NS_CLASS_AVAILABLE(10_11, 9_0)
@interface CNContactFormatter : NSFormatter <NSSecureCoding>
/*!
* @abstract The contact key descriptor required for the formatter.
*
* @discussion Use to fetch all contact keys required for the formatter style. Can combine key descriptors for different formatter styles in the fetch.
*
* @param style The formatting style to be used for the contact name.
* @return The contact key descriptor for the formatting style.
*/
+ (id<CNKeyDescriptor>)descriptorForRequiredKeysForStyle:(CNContactFormatterStyle)style;
/*!
* @abstract Formats the contact name.
*
* @param contact The contact whose name is to be formatted.
* @param style The formatting style to be used for the contact name.
* @return The formatted contact name.
*/
+ (nullable NSString *)stringFromContact:(CNContact *)contact style:(CNContactFormatterStyle)style;
/*!
* @abstract Formats the contact name returning an attributed string.
*
* @discussion This behaves like +stringFromContact:style: except it returns an attributed string. Includes the attribute key CNContactPropertyAttribute.
*
* @param contact The contact whose name is to be formatted.
* @param style The formatting style to be used for the contact name.
* @param attributes The default attributes to use. See NSFormatter for details.
* @return The formatted contact name as an attributed string.
*/
+ (nullable NSAttributedString *)attributedStringFromContact:(CNContact *)contact style:(CNContactFormatterStyle)style defaultAttributes:(nullable NSDictionary *)attributes;
/*!
* @abstract The recommended name order for a given contact.
*/
+ (CNContactDisplayNameOrder)nameOrderForContact:(CNContact *)contact;
/*!
* @abstract The recommended delimiter to use between name components for a given contact.
*/
+ (NSString *)delimiterForContact:(CNContact *)contact;
/*!
* @abstract The style for a contact formatter instance.
*
* @discussion The default value is CNContactFormatterStyleFullName.
*/
@property (NS_NONATOMIC_IOSONLY) CNContactFormatterStyle style;
/*!
* @abstract Formats the contact name.
*
* @param contact The contact whose name is to be formatted.
* @return The formatted contact name.
*/
- (nullable NSString *)stringFromContact:(CNContact *)contact;
/*!
* @abstract Formats the contact name returning an attributed string.
*
* @discussion This behaves like -stringFromContact:style: except it returns an attributed string. CNContactPropertyAttribute key has the value of a CNContact name property key.
*
* @param contact The contact whose name is to be formatted.
* @param attributes The default attributes to use. See NSFormatter for details.
* @return The formatted contact name as an attributed string.
*/
- (nullable NSAttributedString *)attributedStringFromContact:(CNContact *)contact defaultAttributes:(nullable NSDictionary *)attributes;
@end
// Attribute key whose value is a CNContact name component property key.
CONTACTS_EXTERN NSString * const CNContactPropertyAttribute;
NS_ASSUME_NONNULL_END
// ========== Contacts.framework/Headers/CNPhoneNumber.h
//
// CNPhoneNumber.h
// Contacts
//
// Copyright (c) 2015 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Contacts/ContactsDefines.h>
NS_ASSUME_NONNULL_BEGIN
/*!
* @abstract An immutable value object representing a phone number.
*
* @discussion CNPhoneNumber is thread safe.
*/
NS_CLASS_AVAILABLE(10_11, 9_0)
@interface CNPhoneNumber : NSObject <NSCopying, NSSecureCoding>
/*! These will return nil if the stringValue is nil. */
+ (nullable instancetype)phoneNumberWithStringValue:(NSString *)stringValue;
- (nullable instancetype)initWithStringValue:(NSString *)string;
- (null_unspecified instancetype)init NS_DEPRECATED(10_11, 10_13, 9_0, 11_0, "Use initWithStringValue:");
+ (null_unspecified instancetype)new NS_DEPRECATED(10_11, 10_13, 9_0, 11_0, "Use phoneNumberWithStringValue:");
@property (readonly, copy, NS_NONATOMIC_IOSONLY) NSString *stringValue;
@end
// Phone number labels
CONTACTS_EXTERN NSString * const CNLabelPhoneNumberiPhone NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelPhoneNumberMobile NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelPhoneNumberMain NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelPhoneNumberHomeFax NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelPhoneNumberWorkFax NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelPhoneNumberOtherFax NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelPhoneNumberPager NS_AVAILABLE(10_11, 9_0);
NS_ASSUME_NONNULL_END
// ========== Contacts.framework/Headers/CNChangeHistoryFetchRequest.h
//
// CNChangeHistoryFetchRequest.h
// Contacts
//
// Copyright (c) 2019 Apple Inc. All rights reserved.
//
#import <Contacts/CNFetchRequest.h>
@protocol CNKeyDescriptor;
NS_ASSUME_NONNULL_BEGIN
/*!
* @abstract Specifies the criteria to fetch change history.
*
* @discussion Changes to contacts are always returned.
* All changes are coalesced to remove redundant adds, updates and deletes.
* This request is used with [CNContactStore enumeratorForChangeHistoryFetchRequest:error:].
*/
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0))
@interface CNChangeHistoryFetchRequest : CNFetchRequest <NSSecureCoding>
/*!
* @abstract Request changes made after a certain point.
*
* @discussion If non-nil, only changes made after this point in history will be returned.
*
* If nil, a @c CNChangeHistoryDropEverythingEvent will be returned, followed by an add event
* for every contact and group currently in the contacts database.
*/
@property (nullable, copy, nonatomic) NSData * startingToken;
/*!
* @abstract Additional keys to include in the fetched contacts.
*
* @discussion By default, only @c CNContactIdentifierKey will be fetched. If you
* would like to include additional key descriptors to process the contacts,
* include the key descriptors you need.
*
* @c CNContactIdentifierKey will always be fetched, whether you
* request it or not.
*/
@property (copy, nullable, nonatomic) NSArray<id<CNKeyDescriptor>> * additionalContactKeyDescriptors;
/*!
* @abstract Returns contact changes as unified contacts.
*
* @discussion If @c YES, returns unified contact history. Otherwise returns individual contact history.
*
* @note A unified contact is the aggregation of properties from a set of linked individual contacts.
* If an individual contact is not linked then the unified contact is simply that individual contact.
*/
@property (nonatomic) BOOL shouldUnifyResults;
/*!
* @abstract To return mutable contacts and groups.
*
* @discussion If @c YES returns mutable contacts and groups.
*/
@property (nonatomic) BOOL mutableObjects;
/*!
* @abstract Set to @c YES to also fetch group changes.
*/
@property (nonatomic) BOOL includeGroupChanges;
/*!
* @abstract Exclude changes made by certain authors.
*
* @discussion If set, transactions made by the specified authors will be excluded
* from the results. Use this, in conjunction with @c CNSaveRequest.transactionAuthor,
* to suppress processing of changes you already know about.
*/
@property (copy, nonatomic) NSArray<NSString *> * excludedTransactionAuthors;
@end
NS_ASSUME_NONNULL_END
// ========== Contacts.framework/Headers/CNContactStore.h
//
// CNContactStore.h
// Contacts
//
// Copyright (c) 2015–2019 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Contacts/ContactsDefines.h>
#import <Contacts/CNContact.h>
NS_ASSUME_NONNULL_BEGIN
@class CNContact;
@class CNGroup;
@class CNContainer;
@class CNChangeHistoryEvent;
@class CNContactFetchRequest;
@class CNChangeHistoryFetchRequest;
@class CNFetchResult<ValueType>;
@class CNSaveRequest;
/*!
* @abstract The entities the user can grant access to.
*/
typedef NS_ENUM(NSInteger, CNEntityType)
{
/*! The user's contacts. */
CNEntityTypeContacts
} NS_ENUM_AVAILABLE(10_11, 9_0);
/*!
* @abstract The authorization the user has given the application to access an entity type.
*/
typedef NS_ENUM(NSInteger, CNAuthorizationStatus)
{
/*! The user has not yet made a choice regarding whether the application may access contact data. */
CNAuthorizationStatusNotDetermined = 0,
/*! The application is not authorized to access contact data.
* The user cannot change this application’s status, possibly due to active restrictions such as parental controls being in place. */
CNAuthorizationStatusRestricted,
/*! The user explicitly denied access to contact data for the application. */
CNAuthorizationStatusDenied,
/*! The application is authorized to access contact data. */
CNAuthorizationStatusAuthorized
} NS_ENUM_AVAILABLE(10_11, 9_0);
/*!
* @abstract Provides methods to fetch and save contacts.
*
* @discussion The CNContactStore is a thread safe class that can fetch and save contacts, fetch and save groups, and fetch containers.
*
* @note Some good practices are:
* 1) Only fetch contact properties that will be used.
* 2) When fetching all contacts and caching the results, first fetch all contact identifiers only. Then fetch batches of detailed contacts by identifiers as you need them.
* 3) To aggregate several contact fetches collect a set of unique contact identifiers from the fetches. Then fetch batches of detailed contacts by identifiers.
* 4) When CNContactStoreDidChangeNotification is posted, if you cache any fetched contacts/groups/containers then they must be refetched and the old cached objects released.
*/
NS_CLASS_AVAILABLE(10_11, 9_0)
@interface CNContactStore : NSObject
#pragma mark - Privacy Access
/*!
* @abstract Indicates the current authorization status to access contact data.
*
* @discussion Based upon the access, the application could display or hide its UI elements that would access any Contacts API. This method is thread safe.
*
* @return Returns the authorization status for the given entityType.
*/
+ (CNAuthorizationStatus)authorizationStatusForEntityType:(CNEntityType)entityType;
/*!
* @abstract Request access to the user's contacts.
*
* @discussion Users are able to grant or deny access to contact data on a per-application basis. To request access to contact data, call requestAccessForEntityType:completionHandler:. This will not block the application while the user is being asked to grant or deny access. The user will only be prompted the first time access is requested; any subsequent CNContactStore calls will use the existing permissions. The completion handler is called on an arbitrary queue.
*
* @note Recommended to use CNContactStore instance methods in this completion handler instead of the UI main thread. This method is optional when CNContactStore is used on a background thread. If it is not used in that case, CNContactStore will block if the user is asked to grant or deny access.
*
* @param entityType Set to CNEntityTypeContacts.
* @param completionHandler This block is called upon completion. If the user grants access then granted is YES and error is nil. Otherwise granted is NO with an error.
*/
- (void)requestAccessForEntityType:(CNEntityType)entityType completionHandler:(void (^)(BOOL granted, NSError *__nullable error))completionHandler;
#pragma mark - Unified Contacts Helpers
/*!
* @abstract Fetch all unified contacts matching a given predicate.
*
* @discussion Use only predicates from CNContact+Predicates.h. Compound predicates are not supported. Due to unification the returned contacts may have a different identifier.
*
* @note To fetch all contacts use enumerateContactsWithFetchRequest:error:usingBlock:.
*
* @param predicate The predicate to match against.
* @param keys The properties to fetch into the returned CNContact objects. Should only fetch the properties that will be used. Can combine contact keys and contact key descriptors.
* @param error If an error occurs, contains error information.
* @return An array of CNContact objects matching the predicate. If no matches are found, an empty array is returned. If an error occurs, nil is returned.
*/
- (nullable NSArray<CNContact*> *)unifiedContactsMatchingPredicate:(NSPredicate *)predicate keysToFetch:(NSArray<id<CNKeyDescriptor>> *)keys error:(NSError **)error;
/*!
* @abstract Fetch a unified contact with a given identifier.
*
* @discussion Due to unification the returned contact may have a different identifier. To fetch a batch of contacts by identifiers use [CNContact predicateForContactsWithIdentifiers:].
*
* @param identifier The identifier of the contact to fetch.
* @param keys The properties to fetch into the returned CNContact object. Should only fetch the properties that will be used. Can combine contact keys and contact key descriptors.
* @param error If an error occurs, contains error information.
* @return The unified contact matching or linked to the identifier. If no contact with the given identifier is found, nil is returned and error is set to CNErrorCodeRecordDoesNotExist.
*/
- (nullable CNContact *)unifiedContactWithIdentifier:(NSString *)identifier keysToFetch:(NSArray<id<CNKeyDescriptor>> *)keys error:(NSError **)error;
/*!
* @abstract Fetch the unified contact that is the "me" card.
*
* @discussion Fetches the contact that is represented in the user interface as "My Card".
*
* @param keys The properties to fetch into the returned CNContact object. Should only fetch the properties that will be used. Can combine contact keys and contact key descriptors.
* @param error If an error occurs, contains error information.
* @return The unified contact that is the "me" card. If no "me" card is set, nil is returned.
*/
- (nullable CNContact *)unifiedMeContactWithKeysToFetch:(NSArray<id<CNKeyDescriptor>> *)keys error:(NSError **)error NS_AVAILABLE(10_11, NA) __WATCHOS_PROHIBITED;
#pragma mark - Fetch and Save
/*!
* @abstract Enumerate a contact fetch request.
*
* @discussion Executes the given fetch request and returns an enumerator for the results.
* This may prevent all records from being loaded into memory at once.
*
* An exception may be thrown if an error occurs during enumeration.
*
* @param request
* A description of the records to fetch.
*
* @param error
* If the fetch fails, contains an @c NSError object with more information.
*
* @return An enumerator of the records matching the result, or @c nil if there was an error.
*/
- (nullable CNFetchResult<NSEnumerator<CNContact *> *> *)enumeratorForContactFetchRequest:(CNContactFetchRequest *)request error:(NSError **)error NS_SWIFT_UNAVAILABLE("Use iterator(for:) instead");
/*!
* @abstract Enumerate a change history fetch request.
*
* @discussion Executes the given fetch request and returns an enumerator for the results.
* This may prevent all events from being loaded into memory at once.
*
* An exception may be thrown if an error occurs during enumeration.
*
* @param request
* A description of the events to fetch.
*
* @param error
* If the fetch fails, contains an @c NSError object with more information.
*
* @return An enumerator of the events matching the result, or @c nil if there was an error.
*/
- (nullable CNFetchResult<NSEnumerator<CNChangeHistoryEvent *> *> *)enumeratorForChangeHistoryFetchRequest:(CNChangeHistoryFetchRequest *)request error:(NSError **)error NS_SWIFT_UNAVAILABLE("Use iterator(for:) instead");
/*!
* @abstract Enumerates all contacts matching a contact fetch request.
*
* @discussion This method will wait until the enumeration is finished. If there are no results, the block is not called and YES is returned.
*
* @param fetchRequest The contact fetch request that specifies the search criteria.
* @param error If an error occurs, contains error information.
* @param block Called for each matching contact. Set *stop to YES to stop the enumeration.
* @return YES if successful, otherwise NO.
*/
- (BOOL)enumerateContactsWithFetchRequest:(CNContactFetchRequest *)fetchRequest error:(NSError **)error usingBlock:(void (^)(CNContact *contact, BOOL *stop))block;
/*!
* @abstract Fetch all groups matching a given predicate.
*
* @discussion Use only predicates from CNGroup+Predicates.h. Compound predicates are not supported.
*
* @param predicate The predicate to match against. Set to nil to match all groups.
* @param error If an error occurs, contains error information.
* @return An array of CNGroup objects matching the predicate. If no matches are found, an empty array is returned. If an error occurs, nil is returned.
*/
- (nullable NSArray<CNGroup*> *)groupsMatchingPredicate:(nullable NSPredicate *)predicate error:(NSError **)error;
/*!
* @abstract Fetch all containers matching a given predicate.
*
* @discussion Use only predicates from CNContainer+Predicates.h. Compound predicates are not supported.
*
* @param predicate The predicate to match against. Set to nil to match all containers.
* @param error If an error occurs, contains error information.
* @return An array of CNContainer objects matching the predicate. If no matches are found, an empty array is returned. If an error occurs, nil is returned.
*/
- (nullable NSArray<CNContainer*> *)containersMatchingPredicate:(nullable NSPredicate *)predicate error:(NSError **)error;
/*!
* @abstract Executes a save request.
*
* @discussion Do not access objects when save request is executing. A save request with contacts may modify the contacts while executing. A save request only applies the changes to the objects. If there are overlapping changes with multiple, concurrent CNSaveRequests then the last saved change wins.
*
* @param saveRequest Save request to execute.
* @param error If an error occurs, contains error information.
* @return YES if successful, otherwise NO.
*/
- (BOOL)executeSaveRequest:(CNSaveRequest *)saveRequest error:(NSError **)error __WATCHOS_PROHIBITED;
#pragma mark - Miscellaneous
/*!
* @abstract The current history token.
*
* @discussion Retrieve the current history token. If you are fetching contacts or change history events, you should use the token on the @c CNFetchResult instead.
*/
@property (nonatomic, readonly, copy) NSData * currentHistoryToken API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0));
/*!
* @abstract The identifier of the default container.
*
* @discussion This identifier can be used to fetch the default container.
*
* @return The identifier of the default container. If the caller lacks Contacts authorization or an error occurs, nil is returned.
*/
- (nullable NSString *)defaultContainerIdentifier;
@end
#pragma mark - Constants
/*!
* @abstract Notification posted when changes occur in another CNContactStore.
*/
CONTACTS_EXTERN NSString * const CNContactStoreDidChangeNotification NS_AVAILABLE(10_11, 9_0);
NS_ASSUME_NONNULL_END
// ========== Contacts.framework/Headers/CNContact+Predicates.h
//
// CNContact+Predicates.h
// Contacts
//
// Copyright (c) 2015–2018 Apple Inc. All rights reserved.
//
#import <Contacts/CNContact.h>
NS_ASSUME_NONNULL_BEGIN
/*!
* @abstract The predicates to match contacts against.
*
* @discussion Can only use these predicates with CNContactStore and CNContactFetchRequest.
*/
@interface CNContact (Predicates)
/*!
* @abstract To fetch contacts matching a name.
*
* @discussion The name can contain any number of words.
*/
+ (NSPredicate *)predicateForContactsMatchingName:(NSString *)name;
/*!
* @abstract Fetch contacts matching an email address.
*
* @discussion Use this predicate to find the contact(s) which contain the specified
* email address. The search is not case-sensitive.
*
* @param emailAddress
* The email address to search for. Do not include a scheme (e.g., "mailto:").
*/
+ (NSPredicate *)predicateForContactsMatchingEmailAddress:(NSString *)emailAddress API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0));
/*!
* @abstract Fetch contacts matching a phone number.
*
* @discussion If the predicate and contact differ in their use or presence of country
* codes, a best effort will be made to match results; however, inexact
* matches are not guaranteed.
*
* @param phoneNumber
* A @c CNPhoneNumber representing the phone number to search for.
* Do not include a scheme (e.g., "tel:").
*/
+ (NSPredicate *)predicateForContactsMatchingPhoneNumber:(CNPhoneNumber *)phoneNumber API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0));
/*! To fetch contacts matching contact identifiers. */
+ (NSPredicate *)predicateForContactsWithIdentifiers:(NSArray<NSString*> *)identifiers;
+ (NSPredicate *)predicateForContactsInGroupWithIdentifier:(NSString *)groupIdentifier;
+ (NSPredicate *)predicateForContactsInContainerWithIdentifier:(NSString *)containerIdentifier;
@end
NS_ASSUME_NONNULL_END
// ========== Contacts.framework/Headers/CNChangeHistoryEvent.h
//
// CNChangeHistoryEvent.h
// Contacts
//
// Copyright (c) 2019 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol CNChangeHistoryEventVisitor;
@class CNContact;
@class CNGroup;
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0))
@interface CNChangeHistoryEvent : NSObject <NSCopying, NSSecureCoding>
- (void)acceptEventVisitor:(id<CNChangeHistoryEventVisitor>)visitor;
@end
/// Drop all cached information your app has persisted
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0))
@interface CNChangeHistoryDropEverythingEvent : CNChangeHistoryEvent
@end
/// A contact was added
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0))
@interface CNChangeHistoryAddContactEvent : CNChangeHistoryEvent
@property (readonly, strong, nonatomic) CNContact * contact;
@property (readonly, strong, nonatomic, nullable) NSString * containerIdentifier;
@end
/// A contact was updated
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0))
@interface CNChangeHistoryUpdateContactEvent : CNChangeHistoryEvent
@property (readonly, strong, nonatomic) CNContact * contact;
@end
/// A contact was removed
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0))
@interface CNChangeHistoryDeleteContactEvent : CNChangeHistoryEvent
@property (readonly, strong, nonatomic) NSString * contactIdentifier;
@end
/// A group was added
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0))
@interface CNChangeHistoryAddGroupEvent : CNChangeHistoryEvent
@property (readonly, strong, nonatomic) CNGroup * group;
@property (readonly, strong, nonatomic) NSString * containerIdentifier;
@end
/// A group was updated
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0))
@interface CNChangeHistoryUpdateGroupEvent : CNChangeHistoryEvent
@property (readonly, strong, nonatomic) CNGroup * group;
@end
/// A group was deleted
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0))
@interface CNChangeHistoryDeleteGroupEvent : CNChangeHistoryEvent
@property (readonly, strong, nonatomic) NSString * groupIdentifier;
@end
/// A contact was added to a group
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0))
@interface CNChangeHistoryAddMemberToGroupEvent : CNChangeHistoryEvent
@property (readonly, strong, nonatomic) CNContact * member;
@property (readonly, strong, nonatomic) CNGroup * group;
@end
/// A contact was removed from a group
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0))
@interface CNChangeHistoryRemoveMemberFromGroupEvent : CNChangeHistoryEvent
@property (readonly, strong, nonatomic) CNContact * member;
@property (readonly, strong, nonatomic) CNGroup * group;
@end
/// A subgroup was added to a group
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0))
@interface CNChangeHistoryAddSubgroupToGroupEvent : CNChangeHistoryEvent
@property (readonly, strong, nonatomic) CNGroup * subgroup;
@property (readonly, strong, nonatomic) CNGroup * group;
@end
/// A subgroup was removed from a group
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0))
@interface CNChangeHistoryRemoveSubgroupFromGroupEvent : CNChangeHistoryEvent
@property (readonly, strong, nonatomic) CNGroup * subgroup;
@property (readonly, strong, nonatomic) CNGroup * group;
@end
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0))
@protocol CNChangeHistoryEventVisitor <NSObject>
- (void)visitDropEverythingEvent:(CNChangeHistoryDropEverythingEvent *)event;
- (void)visitAddContactEvent:(CNChangeHistoryAddContactEvent *)event;
- (void)visitUpdateContactEvent:(CNChangeHistoryUpdateContactEvent *)event;
- (void)visitDeleteContactEvent:(CNChangeHistoryDeleteContactEvent *)event;
@optional
- (void)visitAddGroupEvent:(CNChangeHistoryAddGroupEvent *)event;
- (void)visitUpdateGroupEvent:(CNChangeHistoryUpdateGroupEvent *)event;
- (void)visitDeleteGroupEvent:(CNChangeHistoryDeleteGroupEvent *)event;
- (void)visitAddMemberToGroupEvent:(CNChangeHistoryAddMemberToGroupEvent *)event;
- (void)visitRemoveMemberFromGroupEvent:(CNChangeHistoryRemoveMemberFromGroupEvent *)event;
- (void)visitAddSubgroupToGroupEvent:(CNChangeHistoryAddSubgroupToGroupEvent *)event;
- (void)visitRemoveSubgroupFromGroupEvent:(CNChangeHistoryRemoveSubgroupFromGroupEvent *)event;
@end
NS_ASSUME_NONNULL_END
// ========== Contacts.framework/Headers/CNContactRelation.h
//
// CNContactRelation.h
// Contacts
//
// Copyright (c) 2015–2019 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Contacts/ContactsDefines.h>
NS_ASSUME_NONNULL_BEGIN
/*!
* @abstract An immutable value object representing a related contact.
*
* @discussion CNContactRelation is thread safe.
*/
NS_CLASS_AVAILABLE(10_11, 9_0)
@interface CNContactRelation : NSObject <NSCopying, NSSecureCoding>
+ (instancetype)contactRelationWithName:(NSString *)name;
- (instancetype)initWithName:(NSString *)name;
@property (readonly, copy, NS_NONATOMIC_IOSONLY) NSString *name;
@end
// Contact relation labels
CONTACTS_EXTERN NSString * const CNLabelContactRelationAssistant NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationManager NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationColleauge NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationTeacher NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSibling NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerSibling NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderSibling NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSister NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungestSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationEldestSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationBrother NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungestBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationEldestBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationFriend NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationMaleFriend NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationFemaleFriend NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSpouse NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationWife NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationHusband NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationPartner NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationMalePartner NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationFemalePartner NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGirlfriendOrBoyfriend NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGirlfriend NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationBoyfriend NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationParent NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationMother NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationFather NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationChild NS_AVAILABLE(10_11, 9_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationDaughter NS_AVAILABLE(10_13, 11_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSon NS_AVAILABLE(10_13, 11_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandparent NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandmother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandmotherMothersMother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandmotherFathersMother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandfather NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandfatherMothersFather NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandfatherFathersFather NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGreatGrandparent NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGreatGrandmother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGreatGrandfather NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandchild NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGranddaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandson NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGreatGrandchild NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGreatGranddaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGreatGrandson NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationParentInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationMotherInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationMotherInLawWifesMother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationMotherInLawHusbandsMother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationFatherInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationFatherInLawWifesFather NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationFatherInLawHusbandsFather NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCoParentInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCoMotherInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCoFatherInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSiblingInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerSiblingInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderSiblingInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSisterInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerSisterInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderSisterInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSisterInLawSpousesSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSisterInLawWifesSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSisterInLawHusbandsSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSisterInLawBrothersWife NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSisterInLawYoungerBrothersWife NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSisterInLawElderBrothersWife NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationBrotherInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerBrotherInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderBrotherInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationBrotherInLawSpousesBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationBrotherInLawHusbandsBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationBrotherInLawWifesBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationBrotherInLawSistersHusband NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationBrotherInLawYoungerSistersHusband NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationBrotherInLawElderSistersHusband NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSisterInLawWifesBrothersWife NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSisterInLawHusbandsBrothersWife NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationBrotherInLawWifesSistersHusband NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationBrotherInLawHusbandsSistersHusband NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCoSiblingInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCoSisterInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCoBrotherInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationChildInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationDaughterInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSonInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousin NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerCousin NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderCousin NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationMaleCousin NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationFemaleCousin NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousinParentsSiblingsChild NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousinParentsSiblingsSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerCousinParentsSiblingsSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderCousinParentsSiblingsSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousinParentsSiblingsDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerCousinParentsSiblingsDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderCousinParentsSiblingsDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousinMothersSistersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerCousinMothersSistersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderCousinMothersSistersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousinMothersSistersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerCousinMothersSistersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderCousinMothersSistersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousinMothersBrothersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerCousinMothersBrothersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderCousinMothersBrothersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousinMothersBrothersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerCousinMothersBrothersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderCousinMothersBrothersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousinFathersSistersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerCousinFathersSistersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderCousinFathersSistersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousinFathersSistersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerCousinFathersSistersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderCousinFathersSistersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousinFathersBrothersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerCousinFathersBrothersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderCousinFathersBrothersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousinFathersBrothersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerCousinFathersBrothersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderCousinFathersBrothersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousinGrandparentsSiblingsChild NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousinGrandparentsSiblingsDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousinGrandparentsSiblingsSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerCousinMothersSiblingsSonOrFathersSistersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderCousinMothersSiblingsSonOrFathersSistersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationYoungerCousinMothersSiblingsDaughterOrFathersSistersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationElderCousinMothersSiblingsDaughterOrFathersSistersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationParentsSibling NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationParentsYoungerSibling NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationParentsElderSibling NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationParentsSiblingMothersSibling NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationParentsSiblingMothersYoungerSibling NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationParentsSiblingMothersElderSibling NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationParentsSiblingFathersSibling NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationParentsSiblingFathersYoungerSibling NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationParentsSiblingFathersElderSibling NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationAunt NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationAuntParentsSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationAuntParentsYoungerSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationAuntParentsElderSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationAuntFathersSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationAuntFathersYoungerSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationAuntFathersElderSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationAuntFathersBrothersWife NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationAuntFathersYoungerBrothersWife NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationAuntFathersElderBrothersWife NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationAuntMothersSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationAuntMothersYoungerSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationAuntMothersElderSister NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationAuntMothersBrothersWife NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandaunt NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationUncle NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationUncleParentsBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationUncleParentsYoungerBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationUncleParentsElderBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationUncleMothersBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationUncleMothersYoungerBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationUncleMothersElderBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationUncleMothersSistersHusband NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationUncleFathersBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationUncleFathersYoungerBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationUncleFathersElderBrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationUncleFathersSistersHusband NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationUncleFathersYoungerSistersHusband NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationUncleFathersElderSistersHusband NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGranduncle NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSiblingsChild NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationNiece NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationNieceSistersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationNieceBrothersDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationNieceSistersDaughterOrWifesSiblingsDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationNieceBrothersDaughterOrHusbandsSiblingsDaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationNephew NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationNephewSistersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationNephewBrothersSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationNephewBrothersSonOrHusbandsSiblingsSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationNephewSistersSonOrWifesSiblingsSon NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandniece NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandnieceSistersGranddaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandnieceBrothersGranddaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandnephew NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandnephewSistersGrandson NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandnephewBrothersGrandson NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationStepparent NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationStepfather NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationStepmother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationStepchild NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationStepson NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationStepdaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationStepbrother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationStepsister NS_AVAILABLE(10_15, 13_0);
// Additional international labels consisting of conjunctions of English terms:
CONTACTS_EXTERN NSString * const CNLabelContactRelationMotherInLawOrStepmother NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationFatherInLawOrStepfather NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationDaughterInLawOrStepdaughter NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSonInLawOrStepson NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationCousinOrSiblingsChild NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationNieceOrCousin NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationNephewOrCousin NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGrandchildOrSiblingsChild NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationGreatGrandchildOrSiblingsGrandchild NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationDaughterInLawOrSisterInLaw NS_AVAILABLE(10_15, 13_0);
CONTACTS_EXTERN NSString * const CNLabelContactRelationSonInLawOrBrotherInLaw NS_AVAILABLE(10_15, 13_0);
NS_ASSUME_NONNULL_END
// ========== Contacts.framework/Headers/CNMutablePostalAddress.h
//
// CNMutablePostalAddress.h
// Contacts
//
// Copyright (c) 2015 Apple Inc. All rights reserved.
//
#import <Contacts/CNPostalAddress.h>
NS_ASSUME_NONNULL_BEGIN
/*!
* @abstract A mutable value object representing a postal address.
*
* @discussion CNMutablePostalAddress is not thread safe.
*
* @note To remove properties when saving a mutable postal address, set string properties to empty values.
*/
NS_CLASS_AVAILABLE(10_11, 9_0)
@interface CNMutablePostalAddress : CNPostalAddress
/*! multi-street address is delimited with carriage returns “\n” */
@property (copy, NS_NONATOMIC_IOSONLY) NSString *street;
@property (copy, NS_NONATOMIC_IOSONLY) NSString *subLocality NS_AVAILABLE(10_12_4, 10_3);
@property (copy, NS_NONATOMIC_IOSONLY) NSString *city;
@property (copy, NS_NONATOMIC_IOSONLY) NSString *subAdministrativeArea NS_AVAILABLE(10_12_4, 10_3);