-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCallKit.framework.h
More file actions
919 lines (673 loc) · 34.1 KB
/
CallKit.framework.h
File metadata and controls
919 lines (673 loc) · 34.1 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
// ========== CallKit.framework/Headers/CXCallObserver.h
//
// CXCallObserver.h
// CallKit
//
// Copyright © 2016 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CallKit/CXBase.h>
NS_ASSUME_NONNULL_BEGIN
@class CXCall;
@class CXCallObserver;
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@protocol CXCallObserverDelegate <NSObject>
- (void)callObserver:(CXCallObserver *)callObserver callChanged:(CXCall *)call;
@end
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXCallObserver : NSObject
/// Retrieve the current call list, blocking on initial state retrieval if necessary
@property (nonatomic, readonly, copy) NSArray<CXCall *> *calls;
/// Set delegate and optional queue for delegate callbacks to be performed on.
/// A nil queue implies that delegate callbacks should happen on the main queue. The delegate is stored weakly
- (void)setDelegate:(nullable id<CXCallObserverDelegate>)delegate queue:(nullable dispatch_queue_t)queue;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CallKit.h
//
// CallKit.h
// CallKit
//
// Copyright © 2015 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CallKit/CXBase.h>
#import <CallKit/CXError.h>
#import <CallKit/CXAction.h>
#import <CallKit/CXTransaction.h>
#import <CallKit/CXCallUpdate.h>
#import <CallKit/CXHandle.h>
#import <CallKit/CXCallAction.h>
#import <CallKit/CXStartCallAction.h>
#import <CallKit/CXAnswerCallAction.h>
#import <CallKit/CXEndCallAction.h>
#import <CallKit/CXSetHeldCallAction.h>
#import <CallKit/CXSetMutedCallAction.h>
#import <CallKit/CXSetGroupCallAction.h>
#import <CallKit/CXPlayDTMFCallAction.h>
#import <CallKit/CXProvider.h>
#import <CallKit/CXProviderConfiguration.h>
#import <CallKit/CXCall.h>
#import <CallKit/CXCallObserver.h>
#import <CallKit/CXCallController.h>
#import <CallKit/CXCallDirectory.h>
#import <CallKit/CXCallDirectoryManager.h>
#import <CallKit/CXCallDirectoryProvider.h>
#import <CallKit/CXCallDirectoryExtensionContext.h>
// ========== CallKit.framework/Headers/CXProvider.h
//
// CXProvider.h
// CallKit
//
// Copyright © 2015 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CallKit/CXBase.h>
NS_ASSUME_NONNULL_BEGIN
@class CXAction;
@class CXCallAction;
@class CXCallUpdate;
@class CXProvider;
@class CXProviderConfiguration;
@class CXTransaction;
@class CXAction;
@class CXCallAction;
@class CXStartCallAction;
@class CXAnswerCallAction;
@class CXEndCallAction;
@class CXSetHeldCallAction;
@class CXSetMutedCallAction;
@class CXSetGroupCallAction;
@class CXPlayDTMFCallAction;
@class AVAudioSession;
typedef NS_ENUM(NSInteger, CXCallEndedReason) {
CXCallEndedReasonFailed = 1, // An error occurred while trying to service the call
CXCallEndedReasonRemoteEnded = 2, // The remote party explicitly ended the call
CXCallEndedReasonUnanswered = 3, // The call never started connecting and was never explicitly ended (e.g. outgoing/incoming call timeout)
CXCallEndedReasonAnsweredElsewhere = 4, // The call was answered on another device
CXCallEndedReasonDeclinedElsewhere = 5, // The call was declined on another device
} API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@protocol CXProviderDelegate <NSObject>
/// Called when the provider has been reset. Delegates must respond to this callback by cleaning up all internal call state (disconnecting communication channels, releasing network resources, etc.). This callback can be treated as a request to end all calls without the need to respond to any actions
- (void)providerDidReset:(CXProvider *)provider;
@optional
/// Called when the provider has been fully created and is ready to send actions and receive updates
- (void)providerDidBegin:(CXProvider *)provider;
/// Called whenever a new transaction should be executed. Return whether or not the transaction was handled:
///
/// - NO: the transaction was not handled indicating that the perform*CallAction methods should be called sequentially for each action in the transaction
/// - YES: the transaction was handled and the perform*CallAction methods should not be called sequentially
///
/// If the method is not implemented, NO is assumed.
- (BOOL)provider:(CXProvider *)provider executeTransaction:(CXTransaction *)transaction;
// If provider:executeTransaction:error: returned NO, each perform*CallAction method is called sequentially for each action in the transaction
- (void)provider:(CXProvider *)provider performStartCallAction:(CXStartCallAction *)action;
- (void)provider:(CXProvider *)provider performAnswerCallAction:(CXAnswerCallAction *)action;
- (void)provider:(CXProvider *)provider performEndCallAction:(CXEndCallAction *)action;
- (void)provider:(CXProvider *)provider performSetHeldCallAction:(CXSetHeldCallAction *)action;
- (void)provider:(CXProvider *)provider performSetMutedCallAction:(CXSetMutedCallAction *)action;
- (void)provider:(CXProvider *)provider performSetGroupCallAction:(CXSetGroupCallAction *)action;
- (void)provider:(CXProvider *)provider performPlayDTMFCallAction:(CXPlayDTMFCallAction *)action;
/// Called when an action was not performed in time and has been inherently failed. Depending on the action, this timeout may also force the call to end. An action that has already timed out should not be fulfilled or failed by the provider delegate
- (void)provider:(CXProvider *)provider timedOutPerformingAction:(CXAction *)action;
/// Called when the provider's audio session activation state changes.
- (void)provider:(CXProvider *)provider didActivateAudioSession:(AVAudioSession *)audioSession;
- (void)provider:(CXProvider *)provider didDeactivateAudioSession:(AVAudioSession *)audioSession;
@end
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXProvider : NSObject
/// In some regions, this functionality may not be supported. Query this value to determine whether your application is allowed to use CXProvider or not.
@property (class, readonly, getter=isSupported) BOOL supported API_AVAILABLE(ios(13.0));
/// Initialize a new provider instance with the supplied configuration
- (instancetype)initWithConfiguration:(CXProviderConfiguration *)configuration NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
/// Set delegate and optional queue for delegate callbacks to be performed on.
/// A nil queue implies that delegate callbacks should happen on the main queue. The delegate is stored weakly
- (void)setDelegate:(nullable id<CXProviderDelegate>)delegate queue:(nullable dispatch_queue_t)queue;
/// Report a new incoming call to the system.
///
/// If completion is invoked with a non-nil `error`, the incoming call has been disallowed by the system and will not be displayed, so the provider should not proceed with the call.
///
/// Completion block will be called on delegate queue, if specified, otherwise on a private serial queue.
- (void)reportNewIncomingCallWithUUID:(NSUUID *)UUID update:(CXCallUpdate *)update completion:(void (^)(NSError *_Nullable error))completion;
/// Report an update to call information.
- (void)reportCallWithUUID:(NSUUID *)UUID updated:(CXCallUpdate *)update;
/// Report that a call ended. A nil value for `dateEnded` results in the ended date being set to now.
- (void)reportCallWithUUID:(NSUUID *)UUID endedAtDate:(nullable NSDate *)dateEnded reason:(CXCallEndedReason)endedReason;
/// Report that an outgoing call started connecting. A nil value for `dateStartedConnecting` results in the started connecting date being set to now.
- (void)reportOutgoingCallWithUUID:(NSUUID *)UUID startedConnectingAtDate:(nullable NSDate *)dateStartedConnecting;
/// Report that an outgoing call connected. A nil value for `dateConnected` results in the connected date being set to now.
- (void)reportOutgoingCallWithUUID:(NSUUID *)UUID connectedAtDate:(nullable NSDate *)dateConnected;
/// The receiver's current configuration.
@property (nonatomic, readwrite, copy) CXProviderConfiguration *configuration;
/// Invalidate the receiver. All existing calls will be marked as ended in failure. The provider must be invalidated before it is deallocated.
- (void)invalidate;
/// List of all transactions that are incomplete.
@property (nonatomic, readonly, copy) NSArray<CXTransaction *> *pendingTransactions;
/// Returns subset of call actions contained in any transaction in -pendingTransactions of the specified class and with the specified call UUID.
- (NSArray<__kindof CXCallAction *> *)pendingCallActionsOfClass:(Class)callActionClass withCallUUID:(NSUUID *)callUUID;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXCall.h
//
// CXCall.h
// CallKit
//
// Copyright © 2016 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CallKit/CXBase.h>
NS_ASSUME_NONNULL_BEGIN
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXCall : NSObject
@property (nonatomic, readonly, copy) NSUUID *UUID;
@property (nonatomic, readonly, assign, getter=isOutgoing) BOOL outgoing;
@property (nonatomic, readonly, assign, getter=isOnHold) BOOL onHold;
@property (nonatomic, readonly, assign) BOOL hasConnected;
@property (nonatomic, readonly, assign) BOOL hasEnded;
- (instancetype)init NS_UNAVAILABLE;
- (BOOL)isEqualToCall:(CXCall *)call;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXCallController.h
//
// CXCallController.h
// CallKit
//
// Copyright © 2015 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CallKit/CXBase.h>
NS_ASSUME_NONNULL_BEGIN
@class CXAction;
@class CXCallObserver;
@class CXTransaction;
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXCallController : NSObject
/// Initialize call controller with a private, serial queue.
- (instancetype)init;
/// Initialize call controller with specified queue, which is used for calling completion blocks.
- (instancetype)initWithQueue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER;
@property (nonatomic, readonly, strong) CXCallObserver *callObserver;
/// Request a transaction to be performed by the in-app provider.
///
/// If the completion block is called with a nil error, then the transaction will be passed to the CXProvider's -provider:executeTransaction: delegate callback.
/// A non-nil error indicates that the requested transaction could not be executed.
///
/// Completion block is performed on the queue supplied to designated initializer.
- (void)requestTransaction:(CXTransaction *)transaction completion:(void (^)(NSError *_Nullable error))completion;
/// Request a transaction containing the specified actions to be performed by the in-app provider.
///
/// If the completion block is called with a nil error, then the transaction will be passed to the CXProvider's -provider:executeTransaction: delegate callback.
/// A non-nil error indicates that the requested transaction could not be executed.
///
/// Completion block is performed on the queue supplied to designated initializer.
- (void)requestTransactionWithActions:(NSArray<CXAction *> *)actions completion:(void (^)(NSError *_Nullable error))completion API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE(macos, watchos);
/// Request a transaction containing the specified action to be performed by the in-app provider.
///
/// If the completion block is called with a nil error, then the transaction will be passed to the CXProvider's -provider:executeTransaction: delegate callback.
/// A non-nil error indicates that the requested transaction could not be executed.
///
/// Completion block is performed on the queue supplied to designated initializer.
- (void)requestTransactionWithAction:(CXAction *)action completion:(void (^)(NSError *_Nullable error))completion API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE(macos, watchos);
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXEndCallAction.h
//
// CXEndCallAction.h
// CallKit
//
// Copyright © 2015 Apple. All rights reserved.
//
#import <CallKit/CXCallAction.h>
NS_ASSUME_NONNULL_BEGIN
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXEndCallAction : CXCallAction
/// Normally, providers can just call -[CXAction fulfill] to indicate action fulfillment. Use this method to note a specific date that the call ended.
- (void)fulfillWithDateEnded:(NSDate *)dateEnded;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXCallDirectory.h
//
// CXCallDirectory.h
// CallKit
//
// Copyright © 2016 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef int64_t CXCallDirectoryPhoneNumber;
static const CXCallDirectoryPhoneNumber CXCallDirectoryPhoneNumberMax = (INT64_MAX - 1);
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXCallDirectoryExtensionContext.h
//
// CXCallDirectoryExtensionContext.h
// CallKit
//
// Copyright © 2016 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CallKit/CXBase.h>
#import <CallKit/CXCallDirectory.h>
NS_ASSUME_NONNULL_BEGIN
@class CXCallDirectoryExtensionContext;
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@protocol CXCallDirectoryExtensionContextDelegate <NSObject>
- (void)requestFailedForExtensionContext:(CXCallDirectoryExtensionContext *)extensionContext withError:(NSError *)error;
@end
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXCallDirectoryExtensionContext : NSExtensionContext
@property (nonatomic, weak, nullable) id<CXCallDirectoryExtensionContextDelegate> delegate;
/**
Whether the request should provide incremental data.
If this is called at the beginning of the request (before any entries have been added or removed) and the result is YES,
then the request must only provide an "incremental" set of entries, i.e. only add or remove entries relative to the last time data
was loaded for the extension. Otherwise, if this method is not called OR is called and returns NO, then the request must provide
a "complete" set of entries, adding the full list of entries from scratch (and removing none), regardless of whether data has ever been
successfully loaded in the past.
*/
@property (nonatomic, readonly, getter=isIncremental) BOOL incremental API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE(macos, watchos);
- (void)addBlockingEntryWithNextSequentialPhoneNumber:(CXCallDirectoryPhoneNumber)phoneNumber;
/**
Remove blocking entry with the specified phone number.
May only be used when `-isIncremental` returns YES, indicating that the request should provide incremental entries and thus may use this
API to remove a previously-added blocking entry.
@param phoneNumber The blocking entry phone number to remove.
*/
- (void)removeBlockingEntryWithPhoneNumber:(CXCallDirectoryPhoneNumber)phoneNumber API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE(macos, watchos);
/**
Remove all currently-stored blocking entries.
May only be used when `-isIncremental` returns YES, indicating that the request should provide incremental entries and thus may use this
API to remove all previously-added blocking entries.
*/
- (void)removeAllBlockingEntries API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE(macos, watchos);
- (void)addIdentificationEntryWithNextSequentialPhoneNumber:(CXCallDirectoryPhoneNumber)phoneNumber label:(NSString *)label;
/**
Remove identification entry with the specified phone number.
May only be used when `-isIncremental` returns YES, indicating that the request should provide incremental entries and thus may use this
API to remove a previously-added identification entry. Removes all identification entries with the specified phone number, even if
multiple identification entries with different labels are present for a single phone number.
@param phoneNumber The identification entry phone number to remove.
*/
- (void)removeIdentificationEntryWithPhoneNumber:(CXCallDirectoryPhoneNumber)phoneNumber API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE(macos, watchos);
/**
Remove all currently-stored identification entries.
May only be used when `-isIncremental` returns YES, indicating that the request should provide incremental entries and thus may use this
API to remove all previously-added identification entries.
*/
- (void)removeAllIdentificationEntries API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE(macos, watchos);
- (void)completeRequestWithCompletionHandler:(nullable void (^)(BOOL expired))completion;
// Use -completeRequestWithCompletionHandler: instead
- (void)completeRequestReturningItems:(nullable NSArray *)items completionHandler:(void (^__nullable)(BOOL expired))completionHandler NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXAction.h
//
// CXAction.h
// CallKit
//
// Copyright © 2016 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CallKit/CXBase.h>
NS_ASSUME_NONNULL_BEGIN
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXAction : NSObject <NSCopying, NSSecureCoding>
/// Unique ID
@property (nonatomic, readonly, copy) NSUUID *UUID;
/// Whether all actions are either fulfilled or failed
@property (nonatomic, readonly, assign, getter=isComplete) BOOL complete;
@property (nonatomic, readonly, strong) NSDate *timeoutDate;
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;
/// Report successful execution of the receiver.
- (void)fulfill;
/// Report failed execution of the receiver.
- (void)fail;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXSetMutedCallAction.h
//
// CXSetMutedCallAction.h
// CallKit
//
// Copyright © 2016 Apple. All rights reserved.
//
#import <CallKit/CXCallAction.h>
NS_ASSUME_NONNULL_BEGIN
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXSetMutedCallAction : CXCallAction
- (instancetype)initWithCallUUID:(NSUUID *)callUUID muted:(BOOL)muted NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCallUUID:(NSUUID *)callUUID NS_UNAVAILABLE;
@property (nonatomic, getter=isMuted) BOOL muted;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXPlayDTMFCallAction.h
//
// CXPlayDTMFCallAction.h
// CallKit
//
// Copyright © 2015 Apple. All rights reserved.
//
#import <CallKit/CXCallAction.h>
typedef NS_ENUM(NSInteger, CXPlayDTMFCallActionType) {
CXPlayDTMFCallActionTypeSingleTone = 1, // The user tapped a digit on the in-call keypad
CXPlayDTMFCallActionTypeSoftPause = 2, // The user included digits after a soft pause in their dial string
CXPlayDTMFCallActionTypeHardPause = 3, // The user included digits after a hard pause in their dial string
} API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
NS_ASSUME_NONNULL_BEGIN
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXPlayDTMFCallAction : CXCallAction
- (instancetype)initWithCallUUID:(NSUUID *)callUUID digits:(NSString *)digits type:(CXPlayDTMFCallActionType)type NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCallUUID:(NSUUID *)callUUID NS_UNAVAILABLE;
// The string representation of the digits that should be played as DTMF tones
@property (nonatomic, copy) NSString *digits;
// Whether or not the string of digits represents tones following a hard or soft pause
@property (nonatomic) CXPlayDTMFCallActionType type;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXAnswerCallAction.h
//
// CXAnswerCallAction.h
// CallKit
//
// Copyright © 2015 Apple. All rights reserved.
//
#import <CallKit/CXCallAction.h>
NS_ASSUME_NONNULL_BEGIN
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXAnswerCallAction : CXCallAction
/// Normally, providers can just call -[CXAction fulfill] to indicate action fulfillment. Use this method to note a specific date that the call connected. A call is considered connected when both caller and callee can start communicating.
- (void)fulfillWithDateConnected:(NSDate *)dateConnected;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXCallAction.h
//
// CXCallAction.h
// CallKit
//
// Copyright © 2015 Apple. All rights reserved.
//
#import <CallKit/CXAction.h>
NS_ASSUME_NONNULL_BEGIN
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXCallAction : CXAction
@property (nonatomic, readonly, copy) NSUUID *callUUID;
- (instancetype)initWithCallUUID:(NSUUID *)callUUID NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXSetHeldCallAction.h
//
// CXSetHeldCallAction.h
// CallKit
//
// Copyright © 2015 Apple. All rights reserved.
//
#import <CallKit/CXCallAction.h>
NS_ASSUME_NONNULL_BEGIN
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXSetHeldCallAction : CXCallAction
- (instancetype)initWithCallUUID:(NSUUID *)callUUID onHold:(BOOL)onHold NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCallUUID:(NSUUID *)callUUID NS_UNAVAILABLE;
@property (nonatomic, getter=isOnHold) BOOL onHold;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXSetGroupCallAction.h
//
// CXSetGroupCallAction.h
// CallKit
//
// Copyright © 2015 Apple. All rights reserved.
//
#import <CallKit/CXCallAction.h>
NS_ASSUME_NONNULL_BEGIN
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXSetGroupCallAction : CXCallAction
- (instancetype)initWithCallUUID:(NSUUID *)callUUID callUUIDToGroupWith:(nullable NSUUID *)callUUIDToGroupWith NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCallUUID:(NSUUID *)callUUID NS_UNAVAILABLE;
/// The UUID of another call to group with.
///
/// - If the call for this action's UUID is already in a group, it should leave that group if necessary.
/// - If nil, leave any group the call is currently in.
@property (nonatomic, copy, nullable) NSUUID *callUUIDToGroupWith;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXHandle.h
//
// CXHandle.h
// CallKit
//
// Copyright © 2016 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CallKit/CXBase.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, CXHandleType) {
CXHandleTypeGeneric = 1,
CXHandleTypePhoneNumber = 2,
CXHandleTypeEmailAddress = 3,
} API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXHandle : NSObject <NSCopying, NSSecureCoding>
@property (nonatomic, readonly) CXHandleType type;
@property (nonatomic, readonly, copy) NSString *value;
- (instancetype)initWithType:(CXHandleType)type value:(NSString *)value NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
- (BOOL)isEqualToHandle:(CXHandle *)handle;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXTransaction.h
//
// CXTransaction.h
// CallKit
//
// Copyright © 2015 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CallKit/CXBase.h>
NS_ASSUME_NONNULL_BEGIN
@class CXAction;
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXTransaction : NSObject <NSCopying, NSSecureCoding>
/// Unique ID
@property (nonatomic, readonly, copy) NSUUID *UUID;
/// Whether all actions have been completed
@property (nonatomic, readonly, assign, getter=isComplete) BOOL complete;
/// The list of actions contained by the receiver
@property (nonatomic, readonly, copy) NSArray<__kindof CXAction *> *actions;
- (instancetype)initWithActions:(NSArray<CXAction *> *)actions NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithAction:(CXAction *)action;
/// Add the provided action to the receiver's list of actions
- (void)addAction:(CXAction *)action;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXBase.h
//
// CXBase.h
// CallKit
//
// Copyright © 2016 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
#ifdef __cplusplus
#define CX_EXTERN extern "C" __attribute__((visibility("default")))
#else
#define CX_EXTERN extern __attribute__((visibility("default")))
#endif
#define CX_CLASS_AVAILABLE(...) CX_EXTERN API_AVAILABLE(__VA_ARGS__)
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXCallDirectoryManager.h
//
// CXCallDirectoryManager.h
// CallKit
//
// Copyright © 2016 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CallKit/CXBase.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, CXCallDirectoryEnabledStatus) {
CXCallDirectoryEnabledStatusUnknown = 0,
CXCallDirectoryEnabledStatusDisabled = 1,
CXCallDirectoryEnabledStatusEnabled = 2,
} API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXCallDirectoryManager : NSObject
@property (readonly, class) CXCallDirectoryManager *sharedInstance;
- (void)reloadExtensionWithIdentifier:(NSString *)identifier completionHandler:(nullable void (^)(NSError *_Nullable error))completion;
- (void)getEnabledStatusForExtensionWithIdentifier:(NSString *)identifier completionHandler:(void (^)(CXCallDirectoryEnabledStatus enabledStatus, NSError *_Nullable error))completion;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXCallDirectoryProvider.h
//
// CXCallDirectoryProvider.h
// CallKit
//
// Copyright © 2016 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CallKit/CXBase.h>
NS_ASSUME_NONNULL_BEGIN
@class CXCallDirectoryExtensionContext;
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXCallDirectoryProvider : NSObject <NSExtensionRequestHandling>
- (void)beginRequestWithExtensionContext:(CXCallDirectoryExtensionContext *)context;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXStartCallAction.h
//
// CXStartCallAction.h
// CallKit
//
// Copyright © 2015 Apple. All rights reserved.
//
#import <CallKit/CXCallAction.h>
NS_ASSUME_NONNULL_BEGIN
@class CXHandle;
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXStartCallAction : CXCallAction
- (instancetype)initWithCallUUID:(NSUUID *)callUUID handle:(CXHandle *)handle NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCallUUID:(NSUUID *)callUUID NS_UNAVAILABLE;
/// Handle for the party to call
@property (nonatomic, copy) CXHandle *handle;
@property (nonatomic, copy, nullable) NSString *contactIdentifier;
@property (nonatomic, getter=isVideo) BOOL video;
/// Normally, providers can just call -[CXAction fulfill] to indicate action fulfillment. Use this method to note a specific date that the call started if it is different from [NSDate date]. A call is considered started when its invitation has been sent to the remote callee.
- (void)fulfillWithDateStarted:(NSDate *)dateStarted;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXError.h
//
// CXError.h
// CallKit
//
// Copyright © 2016 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CallKit/CXBase.h>
NS_ASSUME_NONNULL_BEGIN
CX_EXTERN NSErrorDomain const CXErrorDomain API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
CX_EXTERN NSErrorDomain const CXErrorDomainIncomingCall API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
CX_EXTERN NSErrorDomain const CXErrorDomainRequestTransaction API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
CX_EXTERN NSErrorDomain const CXErrorDomainCallDirectoryManager API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
typedef NS_ERROR_ENUM(CXErrorDomain, CXErrorCode) {
CXErrorCodeUnknownError = 0,
} API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
typedef NS_ERROR_ENUM(CXErrorDomainIncomingCall, CXErrorCodeIncomingCallError) {
CXErrorCodeIncomingCallErrorUnknown = 0,
CXErrorCodeIncomingCallErrorUnentitled = 1,
CXErrorCodeIncomingCallErrorCallUUIDAlreadyExists = 2,
CXErrorCodeIncomingCallErrorFilteredByDoNotDisturb = 3,
CXErrorCodeIncomingCallErrorFilteredByBlockList = 4,
} API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
typedef NS_ERROR_ENUM(CXErrorDomainRequestTransaction, CXErrorCodeRequestTransactionError) {
CXErrorCodeRequestTransactionErrorUnknown = 0,
CXErrorCodeRequestTransactionErrorUnentitled = 1,
CXErrorCodeRequestTransactionErrorUnknownCallProvider = 2,
CXErrorCodeRequestTransactionErrorEmptyTransaction = 3,
CXErrorCodeRequestTransactionErrorUnknownCallUUID = 4,
CXErrorCodeRequestTransactionErrorCallUUIDAlreadyExists = 5,
CXErrorCodeRequestTransactionErrorInvalidAction = 6,
CXErrorCodeRequestTransactionErrorMaximumCallGroupsReached = 7,
} API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
typedef NS_ERROR_ENUM(CXErrorDomainCallDirectoryManager, CXErrorCodeCallDirectoryManagerError) {
CXErrorCodeCallDirectoryManagerErrorUnknown = 0,
CXErrorCodeCallDirectoryManagerErrorNoExtensionFound = 1,
CXErrorCodeCallDirectoryManagerErrorLoadingInterrupted = 2,
CXErrorCodeCallDirectoryManagerErrorEntriesOutOfOrder = 3,
CXErrorCodeCallDirectoryManagerErrorDuplicateEntries = 4,
CXErrorCodeCallDirectoryManagerErrorMaximumEntriesExceeded = 5,
CXErrorCodeCallDirectoryManagerErrorExtensionDisabled = 6,
CXErrorCodeCallDirectoryManagerErrorCurrentlyLoading API_AVAILABLE(ios(10.3), uikitformac(13.0)) = 7,
CXErrorCodeCallDirectoryManagerErrorUnexpectedIncrementalRemoval API_AVAILABLE(ios(11.0), uikitformac(13.0)) = 8,
} API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXProviderConfiguration.h
//
// CXProviderConfiguration.h
// CallKit
//
// Copyright © 2016 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CallKit/CXBase.h>
NS_ASSUME_NONNULL_BEGIN
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXProviderConfiguration : NSObject <NSCopying>
/// Localized name of the provider
@property (nonatomic, readonly, copy) NSString *localizedName;
/// Name of resource in app's bundle to play as ringtone for incoming call
@property (nonatomic, strong, nullable) NSString *ringtoneSound;
@property (nonatomic, copy, nullable) NSData *iconTemplateImageData; // Image should be a square with side length of 40 points
@property (nonatomic) NSUInteger maximumCallGroups; // Default 2
@property (nonatomic) NSUInteger maximumCallsPerCallGroup; // Default 5
/// Whether this provider's calls should be included in the system's Recents list at the end of each call.
/// Default: YES
@property (nonatomic) BOOL includesCallsInRecents API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE(macos, watchos);
@property (nonatomic) BOOL supportsVideo; // Default NO
// Numbers are of type CXHandleType
@property (nonatomic, copy) NSSet<NSNumber *> *supportedHandleTypes;
- (instancetype)initWithLocalizedName:(NSString *)localizedName NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== CallKit.framework/Headers/CXCallUpdate.h
//
// CXCallUpdate.h
// CallKit
//
// Copyright © 2015 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CallKit/CXBase.h>
NS_ASSUME_NONNULL_BEGIN
@class CXHandle;
// Any property that is not set will be ignored
CX_EXTERN API_AVAILABLE(ios(10.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface CXCallUpdate : NSObject <NSCopying>
/// Handle for the remote party (for an incoming call, the caller; for an outgoing call, the callee)
@property (nonatomic, copy, nullable) CXHandle *remoteHandle;
/// Override the computed caller name to a provider-defined value.
/// Normally the system will determine the appropriate caller name to display (e.g. using the user's contacts) based on the supplied caller identifier. Set this property to customize.
@property (nonatomic, copy, nullable) NSString *localizedCallerName;
/// Whether the call can be held on its own or swapped with another call
@property (nonatomic) BOOL supportsHolding;
/// Whether the call can be grouped (merged) with other calls when it is ungrouped
@property (nonatomic) BOOL supportsGrouping;
/// The call can be ungrouped (taken private) when it is grouped
@property (nonatomic) BOOL supportsUngrouping;
/// The call can send DTMF tones via hard pause digits or in-call keypad entries
@property (nonatomic) BOOL supportsDTMF;
/// The call includes video in addition to audio.
@property (nonatomic) BOOL hasVideo;
@end
NS_ASSUME_NONNULL_END