新版本提審卻得到了一個不幸的消息,審核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 -法律
最近,中國工業(yè)和信息化部要求在中國應(yīng)用商店的所有應(yīng)用中停用CallKit功能。
在我們的審查中,我們發(fā)現(xiàn)你的應(yīng)用程序目前包含CallKit功能,并且在app Store Connect中將中國列為可用區(qū)域。
下一個步驟
CallKit功能在中國激活時,無法批準該應(yīng)用程序。請作出適當?shù)母?,并重新提交此app以供審查。
如果您已經(jīng)確認CallKit功能在中國處于不活動狀態(tài),您可以在解決中心回復(fù)此消息進行確認。
通過互聯(lián)網(wǎng)協(xié)議的語音(VoIP)呼叫功能仍然被允許,但不能再利用CallKit的直觀外觀和感覺。CallKit可以繼續(xù)在中國以外的應(yīng)用中使用。
解決辦法
目前換了一種新的方式來判斷該狀態(tài),具體實現(xiàn)方式是在 AppDelegate 類中通過生命周期的方式進行監(jiān)測,通過 App 切換至后臺模式和重新喚醒的方式并搭配通知去處理具體業(yè)務(wù)。
官方 api 中提供了兩種方式,通過監(jiān)測 App 喚起和進入后臺的模式,具體方法如下:
首先,App 進入后臺模式時會觸發(fā)該方法:
- (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 角標
// 考試系統(tǒng) --- 通知考試功能模塊 --- App重新被喚醒 --- AppReactivate
[kNotificationCenter postNotificationName:@"AppReactivate" object:nil userInfo:nil];
}
暫時通過該中方式來代替,若有更佳的方式,歡迎大家廣發(fā)建議交流!
以上便是此次分享的全部內(nèi)容,希望能對大家有所幫助!