2016-11-16 28 views
0

我已經集成了PushWoosh在我的iOS應用程序按給定的guide。但我仍然無法獲得簡單或VOIP通知。如何整合PushWoosh在iOS應用程序的VOIP背景

是否應該添加其他設置?

我們需要爲測試設備添加哪個設備令牌?

現在我已經添加了設備令牌,我得到了didRegisterForRemoteNotificationsWithDeviceToken

+0

能否請你在這裏提到您的iOS版本。 – iMHitesh

回答

0

如果您有以下事情正確,那麼你肯定有通知。

1)添加您的Pushwoosh_APPID到您.plist文件

2)實現以下方法可循,因此收到通知的時候可以收到警報。

- (void) onPushAccepted:(PushNotificationManager *)pushManager withNotification:(NSDictionary *)pushNotification 
{ 
    dispatch_async(dispatch_get_main_queue(), ^{ 
     UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Push Notification" message:[NSString stringWithFormat:@"onPushAccepted : %@", pushNotification] preferredStyle:UIAlertControllerStyleAlert]; 
     UIAlertAction *alertAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]; 
     [alertController addAction:alertAction]; 
     [self.window.rootViewController presentViewController:alertController animated:YES completion:nil]; 
    }); 
} 

注: -

如果你已經與iOS 10或以上的工作,那麼它是強制性的,以在功能遠程通知。

轉到 - >項目設置 - >功能 - >Enable推送通知。

進入 - >項目設置 - >性能 - >後臺模式 - >Enable遠程通知和VoIP

+0

我試圖使用上面的代碼與應用程序appDelegate文件,但仍然沒有收到應用程序通知。我正在通過pushWoosh網站門戶生成通知。 Capabilities內部的所有設置也會被糾正。我收到pushwoosh上的默認應用程序通知,但如果我使用自定義應用程序,則無法獲得通知。 –

+0

你有沒有檢查你的臨時配置文件和p.12證書ios是否正確。 – iMHitesh

+0

是的。我正在使用自動配置 –

相關問題