我正在尝试设置IBM Mobile First Push Notifications。
我使用Mobile First Platform 7.1.0.00.20151107-1653
到目前为止我做了什么:
在我的客户端应用中添加了Push初始化功能:
var isPushSupported = WL.Client.Push.isPushSupported();
if (isPushSupported) {
WL.Client.Push.registerEventSourceCallback(
"myPush",
"MetaAdapter",
"PushEventSource");
WL.Client.Push.subscribe("myPush", {
onSuccess: function(){
alert("success");
},
onFailure: function(errorMsg){
alert(JSON.stringify(errorMsg));
}
});
}else{
console.log('---> Push not supported by device')
}
之后我将代码推送到我的服务器上(这也没问题)我试图启动应用程序。在应用程序启动时,有一个典型的"你想允许推送通知这个应用程序"我允许的问题。
现在,当执行发布的代码时,onFailure错误消息显示为500 - Unexpected Error
。
在XCode控制台中,我可以看到以下输出:
{"errors":["A truncation error was encountered trying to shrink VARCHAR 'APP_NAME\/1.0.0 (iPhone; iOS 9.1; Scale\/2.00),Ma&' to length 254.
{prepstmnt 772646547 INSERT INTO PUSH_DEVICES (CREATED_MODE, CREATED_TIME, LAST_UPDATED_TIME, APPLICATION_ID, DEVICE_ID, ENVIRONMENT_ID, PUSH_KEY, LATITUDE, LOCALE, LONGITUDE, PLATFORM, STATUS, TOKEN, USER_AGENT, USER_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
[params=(String) API, (String) 2015-11-30T19:56:15Z, (String) 2015-11-30T19:56:15Z, (String) app_identifier, (String) 54D7CA02-64BA-4644-85E2-B29A0811FE6B, (String)
app_identifier-1.0.0, (null) null, (null) null, (null) null, (null) null, (String) A, (int) 0, (String) ef65cf4638308d13de9af9e09704cfdd9fe1010d3dcd678feb2aa8cf61a4b855, (String)
APP_NAME\/1.0.0 (iPhone; iOS 9.1; Scale\/2.00),APP_NAME...,
(String) 6dcd1097-1aa0-4111-af44-3234c29079e0]} [code=20000, state=22001]"],"isSuccessful":false,"warnings":[],"info":[]}*/
APP_NAME长度为21个字符,app_identifier长度为52个字符。
您有什么想法来解决这个问题吗?
谢谢!
答案 0 :(得分:0)
看起来需要调查的东西。如果您是IBM客户或业务合作伙伴,我建议您打开PMR。