File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ + (CXProviderConfiguration *)getProviderConfiguration:(NSDictionary*)settings
391
391
providerConfiguration.maximumCallsPerCallGroup = 1 ;
392
392
providerConfiguration.supportedHandleTypes = [NSSet setWithObjects: [NSNumber numberWithInteger: CXHandleTypePhoneNumber], nil ];
393
393
if (settings[@" supportsVideo" ]) {
394
- providerConfiguration.supportsVideo = settings[@" supportsVideo" ];
394
+ providerConfiguration.supportsVideo = [ settings[@" supportsVideo" ] boolValue ];
395
395
}
396
396
if (settings[@" maximumCallGroups" ]) {
397
397
providerConfiguration.maximumCallGroups = [settings[@" maximumCallGroups" ] integerValue ];
@@ -461,8 +461,17 @@ + (BOOL)application:(UIApplication *)application
461
461
INInteraction *interaction = userActivity.interaction ;
462
462
INPerson *contact;
463
463
NSString *handle;
464
- BOOL isAudioCall = [userActivity.activityType isEqualToString: INStartAudioCallIntentIdentifier];
465
- BOOL isVideoCall = [userActivity.activityType isEqualToString: INStartVideoCallIntentIdentifier];
464
+ BOOL isAudioCall;
465
+ BOOL isVideoCall;
466
+ // iOS 13 returns an INStartCallIntent userActivity type
467
+ if (@available (iOS 13 , *)) {
468
+ INStartCallIntent *intent = (INStartCallIntent*)interaction.intent ;
469
+ isAudioCall = intent.callCapability == INCallCapabilityAudioCall;
470
+ isVideoCall = intent.callCapability == INCallCapabilityVideoCall;
471
+ } else {
472
+ isAudioCall = [userActivity.activityType isEqualToString: INStartAudioCallIntentIdentifier];
473
+ isVideoCall = [userActivity.activityType isEqualToString: INStartVideoCallIntentIdentifier];
474
+ }
466
475
467
476
if (isAudioCall) {
468
477
INStartAudioCallIntent *startAudioCallIntent = (INStartAudioCallIntent *)interaction.intent ;
You can’t perform that action at this time.
0 commit comments