0 Replies
      Latest reply on May 16, 2019 7:01 PM by gzoe
      gzoe Level 1 Level 1 (0 points)

        The callback 'provider: performEndCallAction' will be executed if the call is rejected using CallKit.

        Using this callback, I am trying to launch my app by the URL scheme.

         

        First, for testing, I tried to launch the Photos app as follows:

        - (void)provider:(CXProvider *)provider performEndCallAction:(CXEndCallAction *)action {
            NSLog(@"CXProvider provider:performEndCallAction:");
        
            // Launch Photos app
            NSURL *url = [NSURL URLWithString:@"photos-redirect://"];
            if(floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_9_x_Max){
                // iOS10 or later
                if([[UIApplication sharedApplication] canOpenURL:url]){
                    [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
                }
            }else{
                // iOS9 or earlier
                if([[UIApplication sharedApplication] canOpenURL:url]){
                    [[UIApplication sharedApplication] openURL:url];
                }
            }
        }

         

        If my app has launched, the Photos app will launch when the call is rejected. However, if my app has not launched and received a PushKit notification, the Photos app will not launch when the call is rejected.

         

        Is there any way to launch my app when the call is rejected if the app has not been launched?