2017-03-29 5 views
0

私はCordovaアプリケーションでプッシュ通知を実装しています。 Androidでは、プッシュ通知が正常に動作します。しかしiPhoneでは、私は通知を受け取っていません。IBM MobileFirst Platform 8でデバイスを登録した後、iOSでプッシュ通知を受信しない

プッシュ通知用にiPhoneデバイスを正常に登録することができました。また、MFPサーバー経由で作成したタグもすべて取得しています。 iOS用の通知を送信している間、私は、「通知メッセージが配信のために受け入れられた」配信成功メッセージtahtが あるのですか

をしかし、私はiPhone上の任意の通知を得ることはありません。

私は IBM MobileFirst財団 8.0.0-2016121916

開発キットバージョン使用しています

:8.0.0.00-20161122-002317

コード:

function wlCommonInit(){ 

//initialize app for push notification 
    MFPPush.initialize (
     function(successResponse) { 
      alert("Push Notification Successfully intialized"); 
      MFPPush.registerNotificationsCallback(notificationReceived); 
     }, 
     function(failureResponse) { 
      alert("Failed to initialize"); 
     } 
    ); 

    //Check device is Supported for push notification 
    MFPPush.isPushSupported (
     function(successResponse) { 
      alert("Device is Push Supported"); 
     }, 
     function(failureResponse) { 
      alert("Failed to get push support status"); 
     } 
    ); 

    //regiser app for push notification 
    MFPPush.registerDevice(null, 
     function(successResponse) { 
       alert("Device Successfully registered"); 
     }, 
     function(failureResponse) { 
      alert("Failed to register"); 
     } 
    ); 

    var notificationReceived = function(message) { 
     alert(JSON.stringify(message)); 
    }; 
} 

Serverのログを enter image description here

2017-03-30 10:27:26.864028 MyProject[585:100605] [DEBUG] [OCLogger] Analytics data successfully sent to server. 
2017-03-30 10:27:26.874357 MyProject[585:100605] Response Content : {"createdTime":"2017-03-29T14:27:31Z","lastUpdatedTime":"2017-03-30T04:54:33Z","createdMode":"API","deviceId":"20D322D5-781B-4C2C-82CE-673648AAB6FD","userId":"anonymous","token":"8c6c071ee6095e0ef5888abf8b885984fc02860c8a837f58be8118df8c353227","platform":"A","href":"http://192.168.10.126:9080/imfpush/v1/apps/com.MyProject.mobile/devices/20D322D5-781B-4C2C-82CE-673648AAB6FD"} 
2017-03-30 10:27:48.280985 MyProject[585:100651] [] nw_coretls_read_one_record tls_handshake_process: [-9802] 
2017-03-30 10:27:49.021119 MyProject[585:100651] [] nw_coretls_read_one_record tls_handshake_process: [-9802] 
2017-03-30 10:27:49.026982 MyProject[585:100657] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) 
2017-03-30 10:28:21.129769 MyProject[585:100682] void SendDelegateMessage(NSInvocation *): delegate (webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:) failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode 
2017-03-30 10:28:21.212950 MyProject[585:100605] Finished load of: file:///var/containers/Bundle/Application/03675139-9EBE-4F42-B07D-45C98D40A440/MyProject.app/www/index.html#/appTour 
2017-03-30 10:28:32.822257 MyProject[585:100832] Inside sendRequest : WLRequestBuilder 
2017-03-30 10:28:33.171541 MyProject[585:100605] Response Content : {"subscribed":[{"tagName":"promotional","userId":"anonymous","subscriptionId":"528","deviceId":"20D322D5-781B-4C2C-82CE-673648AAB6FD","href":"http://192.168.10.126:9080/imfpush/v1/apps/com.MyProject.mobile/subscriptions"},{"tagName":"transectional","userId":"anonymous","subscriptionId":"529","deviceId":"20D322D5-781B-4C2C-82CE-673648AAB6FD","href":"http://192.168.10.126:9080/imfpush/v1/apps/com.MyProject.mobile/subscriptions"},{"tagName":"yy","userId":"anonymous","subscriptionId":"530","deviceId":"20D322D5-781B-4C2C-82CE-673648AAB6FD","href":"http://192.168.10.126:9080/imfpush/v1/apps/com.MyProject.mobile/subscriptions"}],"subscriptionExists":[],"tagsNotFound":{"code":"FPWSE0001E","message":"Not Found - The target resource 'tagNames' does not exist. Check the 'tags' parameter.","tags":[]}} 
2017-03-30 10:28:33.176354 MyProject[585:100605] [DEBUG] [OCLogger] The log file is empty. There are no persisted logs to send. 
2017-03-30 10:28:33.183157 MyProject[585:100605] Inside sendRequest : WLRequestBuilder 
2017-03-30 10:28:33.298817 MyProject[585:100605] Response Content : 
2017-03-30 10:28:33.300344 MyProject[585:100605] [DEBUG] [OCLogger] Analytics data successfully sent to server. 
2017-03-30 10:28:37.770125 MyProject[585:100605] WL.JSONStore success 
+0

サーバーログは表示できますか? – TyLy

+0

@TyLy更新されたサーバーログを参照してください。 –

答えて

0

ログから、MFPサーバーがAPNSと通信できないことが明らかです。 MFPサーバーからAPNSへの接続がタイムアウトしています。

ネットワークルールまたはファイアウォールが、MFPサーバーからAPNSへの送信アクセスを許可するように設定されていることを確認します。必要なすべてのポートが開いていることを確認し、インバウンドとアウトバウンドの通信を許可します。その間、APNSのホスト名にアクセスできるようにしてください。特にIPをホワイトリストに登録するのではなく、

ポートとドメインの詳細については、linkを参照してください。

関連する問題