CallKit 被拒 - iOS

新版本提审却得到了一个不幸的消息,审核gg了 。。。


异常提示

Guideline 5.0 - Legal

Recently, the Chinese Ministry of Industry and Information Technology (MIIT) requested that CallKit functionality be deactivated in all apps available on the China App Store.

During our review, we found that your app currently includes CallKit functionality and has China listed as an available territory in App Store Connect.

Next Steps

This app cannot be approved with CallKit functionality active in China. Please make the appropriate changes and resubmit this app for review.

If you have already ensured that CallKit functionality is not active in China, you may reply to this message in Resolution Center to confirm.

Voice over Internet Protocol (VoIP) call functionality continues to be allowed but can no longer take advantage of CallKit’s intuitive look and feel. CallKit can continue to be used in apps outside of China.

指引5.0 -法律

最近,中国工业和信息化部要求在中国应用商店的所有应用中停用CallKit功能。

在我们的审查中,我们发现你的应用程序目前包含CallKit功能,并且在app Store Connect中将中国列为可用区域。

下一个步骤

CallKit功能在中国激活时,无法批准该应用程序。请作出适当的更改,并重新提交此app以供审查。

如果您已经确认CallKit功能在中国处于不活动状态,您可以在解决中心回复此消息进行确认。

通过互联网协议的语音(VoIP)呼叫功能仍然被允许,但不能再利用CallKit的直观外观和感觉。CallKit可以继续在中国以外的应用中使用。

解决办法

目前换了一种新的方式来判断该状态,具体实现方式是在 AppDelegate 类中通过生命周期的方式进行监测,通过 App 切换至后台模式和重新唤醒的方式并搭配通知去处理具体业务。

官方 api 中提供了两种方式,通过监测 App 唤起和进入后台的模式,具体方法如下:
首先,App 进入后台模式时会触发该方法:

- (void)applicationDidEnterBackground:(UIApplication *)application {
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
    
    [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];// 移除推送 icon 角标
    
    // App进入后台运行 --- 通知考试功能模块 --- AppStarting
    [kNotificationCenter postNotificationName:@"AppStarting" object:nil userInfo:nil];
}

其次,App 重新从后台模式唤醒:

- (void)applicationWillEnterForeground:(UIApplication *)application {
    // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
    
    [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];// 移除推送 icon 角标
    
    // 考试系统 --- 通知考试功能模块 --- App重新被唤醒 --- AppReactivate
    [kNotificationCenter postNotificationName:@"AppReactivate" object:nil userInfo:nil];
}

暂时通过该中方式来代替,若有更佳的方式,欢迎大家广发建议交流!


以上便是此次分享的全部内容,希望能对大家有所帮助!

推荐阅读更多精彩内容