Azhar
Azhar

Reputation: 20678

ios: how to get IntentHandler Confirm response in UIViewController?

I am developing an INStartCallIntent ... I want to invoke CallKit from confirm method of IntentHandler. but

func confirm(intent: INStartCallIntent) async -> INStartCallIntentResponse {
    //    CallManager.sharedInstance().delegate = self
    //    CallManager.sharedInstance().startCall(withPhoneNumber: "+923224123443")
        
        let userActivity = NSUserActivity(activityType: String(describing: INStartCallIntent.self))
        return INStartCallIntentResponse(code: .continueInApp, userActivity: userActivity)
    }

shows error Cannot find 'CallManager' in scope

enter image description here

while its in here

enter image description here

I implemented AppDelegate function but could not invoke it from IntentHandler.

- (void)application:(UIApplication *)application handleIntent:(INIntent *)intent completionHandler:(void (^)(INIntentResponse * _Nonnull))completionHandler{

//    if(intent == INStartCallIntent){
//        NSLog(@"Hey ... here it is");
//    }
}

CallManager.h added in project's bridging header file

enter image description here

Seems like its not accessible in IntentExtension.

CallManager Files are in kBeaconDemo_ios while they are not accessible in CallHomeAwayData IntentExtension.

enter image description here

How can I call CallManager after confirm? Please suggest

Upvotes: 0

Views: 297

Answers (0)

Related Questions