2016-03-09 151 views
0

我們的應用使用voip推送通知。我們用下面的代碼,以便與APNSVoip推送通知突然停止工作

PKPushRegistry * voipRegistry = [[PKPushRegistry alloc] initWithQueue: dispatch_get_main_queue()]; 
/ 
voipRegistry.delegate = self; 
/ 
voipRegistry.desiredPushTypes = [NSSet setWithObject:PKPushTypeVoIP]; // register 

它用來做工精細,突然停在了最新的iOS版本9.2.1和9.3(測試版)的工作進行註冊。現在,不詢問用戶是否希望允許通知。即使我們能夠通過此API呼叫獲得設備令牌

- (void)pushRegistry:(PKPushRegistry *)registry didUpdatePushCredentials: (PKPushCredentials *)credentials forType:(NSString *)type { 

任何幫助將不勝感激。 謝謝

回答

0

我得到了蘋果的答案,我們也需要使用registerUserNotificationSettings來詢問用戶推送通知的權限。

希望它可以幫助別人。