How to get the voip call log information in application - Call Kit

后端 未结 3 801
失恋的感觉
失恋的感觉 2020-12-12 02:41

I have implemented call kit in my voip app in which i generate the call logs for incoming or outgoing calls (visible on phone recent tab). When i click on call logs it will

3条回答
  •  有刺的猬
    2020-12-12 03:00

    We can take phone number from userActivity,

    - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restora`tionHandler:(void(^)(NSArray * __nullable restorableObjects))restorationHandler{
        INInteraction *interaction = userActivity.interaction;
        INStartAudioCallIntent *startAudioCallIntent = (INStartAudioCallIntent *)interaction.intent;
        INPerson *contact = startAudioCallIntent.contacts[0];
        INPersonHandle *personHandle = contact.personHandle;
        NSString *phoneNumber = personHandle.value;
    }
    

提交回复
热议问题