我正在使用移動應用程序生成器來製作一些原型。其中一個我需要發送推送通知。因此,我使用App Builder創建了一個App,並使用推送通知服務(App GUID和App Route)配置推送設置。如何在Mobile App Buider中配置推送通知?
在那之後,我被定義設置的蘋果證書發送推送(https://new-console.ng.bluemix.net/docs/services/mobilepush/t_push_provider_ios.html)
所以,當我嘗試使用推送通知服務發送推送通知(Bluemix)我收到一個消息: 1 - 內部服務器錯誤。找不到設備。
當我看到一個日誌XCode中我發現:
registerDeviceToken:completionHandler:]_block_invoke_2 in IMFPushClient.m:116 :: Response of device registration - Response is: httpStatus: 201
responseHeaders: {
Connection = "Keep-Alive";
"Content-Type" = "application/json";
Date = "Thu, 12 May 2016 18:21:22 GMT";
Location = "https://enviarpush.mybluemix.net:443/imfpush/v1/apps/428e6b13-2cc7-4f99-8d7e-9741d6742709/devices/AFAF9994-535D-4F6C-9789-317E680833A8";
"Transfer-Encoding" = Identity;
"X-Backside-Transport" = "OK OK";
"X-Global-Transaction-ID" = 2301423703;
"X-Powered-By" = "Servlet/3.0";
}
responseJson: {
createdMode = API;
createdTime = "2016-05-12T18:21:22Z";
deviceId = "AFAF9994-535D-4F6C-9789-317E680833A8";
href = "https://enviarpush.mybluemix.net:443/imfpush/v1/apps/428e6b13-2cc7-4f99-8d7e-9741d6742709/devices/AFAF9994-535D-4F6C-9789-317E680833A8";
lastUpdatedTime = "2016-05-12T18:21:22Z";
platform = A;
token = 7574a3f1d14a7a01f8d43663cef686b3cb66a634b71ed20608a739c4f55356db;
userId = "";
}
Response text: {"createdTime":"2016-05-12T18:21:22Z","lastUpdatedTime":"2016-05-12T18:21:22Z","createdMode":"API","deviceId":"AFAF9994-535D-4F6C-9789-317E680833A8","userId":"","token":"7574a3f1d14a7a01f8d43663cef686b3cb66a634b71ed20608a739c4f55356db","platform":"A","href":"https://enviarpush.mybluemix.net:443/imfpush/v1/apps/428e6b13-2cc7-4f99-8d7e-9741d6742709/devices/AFAF9994-535D-4F6C-9789-317E680833A8"}
此相關信息確認我的設備寄存器,我是正確的?
感謝
謝謝馬修。 –