2016-09-16 20 views
0

プッシュ通知に必要なすべての証明書が作成されており、バックエンドプッシュボットが使用されています。プッシュボットからプッシュ通知を受け取りますが、その後は メソッドが呼び出されません。iOS:プッシュボットで通知をプッシュ

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo 

私はプッシュボットフレームワークを含み、すべての手順に従っています。私のコードで何が問題になっているのか、バックエンドから何か問題があります。私は解決策を見つけることができません。

+0

iOSバージョンをテストしていますか? –

+0

最新のiosバージョン9.3 –

+0

バックグラウンドフェッチを有効にしていますか?あなたはコンテンツを利用してプッシュしていますか? –

答えて

0
There may be many reason not one. I will let you know the Steps. Make sure it is done. 

1)Have you enabled push notification in Capabilities.if not please enable it. 

2)Check your App identifier whether your bundleId matches and you enabled a push notification for that bundle ID. 

3)The Sample code for iOS8 or above 
UIUserNotificationType allNotificationTypes = 
     (UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge); 
     UIUserNotificationSettings *settings = 
     [UIUserNotificationSettings settingsForTypes:allNotificationTypes categories:nil]; 
     [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; 
     [[UIApplication sharedApplication] registerForRemoteNotifications];