工作灯WL.Client.Push.onReadyToSubscribe不是被解雇 [英] Worklight WL.Client.Push.onReadyToSubscribe not getting fired
问题描述
我面临着工作灯推送通知的问题。
I am facing an issue with Worklight Push Notification.
我也跟着工作灯5.0.5的所有步骤,Module_41 _-_ Push_Notifications。
PDF文件,并没有演示推。
I followed all steps of Worklight 5.0.5, Module_41_-_Push_Notifications. PDF file, and did Push demo.
我现在面临一个错误,说明:
I am facing an error stating:
[错误]无法预订,通知令牌不更新的
服务器
[ERROR] Can't subscribe, notification token is not updated on the server
虽然在控制台上它确实表明设备ID。
我的假设是的 WL.Client.Push.onReadyToSubscribe 不会被解雇。
Although on the console it does show the device ID. My assumption is WL.Client.Push.onReadyToSubscribe not getting fired.
有人有类似的问题。
https://www.ibm.com/developerworks/forums/thread.jspa ?主题ID = 456501
我已经设置
<pushSender password="Your_Password"/>
和重新生成,并多次部署的应用程序,但没有任何好处。
and re-generated and deployed App multiple times but no benefit.
任何帮助或建议,欢迎。
Any help or suggestion are welcome.
Environment:
WL 5.0.5 & 5.0.6
Xcode 4.2
iPhone (iOS 5.1 and 6.1)
我再次尝试在本地MAC,通过测试iPhone 4的的iOS 5.1。通过设备上运行,并连接到Studio码头时。我正在下面。
I tried once again on local mac, testing via iPhone 4 , iOS 5.1. when running through device and connecting to Studio jetty. I am getting below.
Mar 27 11:23:49 Appsdev-iPhone PushApplication[211] <Warning>: Applications are expected to have a root view controller at the end of application launch
Mar 27 11:23:49 Appsdev-iPhone PushApplication[211] <Warning>: Web resources integrity test is disabled.
Mar 27 11:23:49 Appsdev-iPhone kernel[0] <Debug>: launchd[211] Builtin profile: container (sandbox)
Mar 27 11:23:49 Appsdev-iPhone kernel[0] <Debug>: launchd[211] Container: /private/var/mobile/Applications/5DA837C4-F039-4795-9509-C98383E40C68 [69] (sandbox)
Mar 27 11:23:49 Appsdev-iPhone PushApplication[211] <Warning>: Multi-tasking -> Device: YES, App: YES
Mar 27 11:23:51 Appsdev-iPhone PushApplication[211] <Warning>: [LOG] ondeviceready event dispatched
Mar 27 11:23:51 Appsdev-iPhone PushApplication[211] <Warning>: {
appVersionPref = "1.0";
freeSpace = 14291787776;
wlSkinLoaderChecksum = "(null)";
wlSkinName = default;
}
Mar 27 11:23:51 Appsdev-iPhone PushApplication[211] <Warning>: [LOG] wlclient init started
Mar 27 11:23:51 Appsdev-iPhone PushApplication[211] <Warning>: [LOG] Read cookies: null
Mar 27 11:23:51 Appsdev-iPhone PushApplication[211] <Warning>: [LOG] CookieMgr read cookies: {}
Mar 27 11:23:51 Appsdev-iPhone PushApplication[211] <Warning>: [LOG] Request [http://172.20.10.2:8080/apps/services/api/PushApplication/iphone/init]
Mar 27 11:24:12 Appsdev-iPhone PushApplication[211] <Warning>: [LOG] Request [login]
Mar 27 11:24:12 Appsdev-iPhone PushApplication[211] <Warning>: [LOG] Request [http://172.20.10.2:8080/apps/services/api/PushApplication/iphone/init]
Mar 27 11:24:12 Appsdev-iPhone PushApplication[211] <Warning>: DeviceAuthManager:getWorklightUniqueDeviceId --> returning UUID from the keychain
Mar 27 11:24:12 Appsdev-iPhone PushApplication[211] <Warning>: [LOG] Request [http://172.20.10.2:8080/apps/services/api/PushApplication/iphone/init]
Mar 27 11:24:12 Appsdev-iPhone PushApplication[211] <Warning>: [LOG] Clearing notification subscriptions.
Mar 27 11:24:12 Appsdev-iPhone PushApplication[211] <Warning>: [LOG] Send new server notification token id.
Mar 27 11:24:12 Appsdev-iPhone SpringBoard[15] <Warning>: No valid 'aps-environment' entitlement string found for application 'PushApplication': (null). Notifications will not be delivered.
Mar 27 11:24:12 Appsdev-iPhone PushApplication[211] <Warning>: [LOG] response [http://172.20.10.2:8080/apps/services/api/PushApplication/iphone/init] success: /*-secure-
{"userPrefs":{},"WL-Authentication-Success":{"wl_remoteDisableRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null"},"PushAppRealm":{"userId":"aahad","attributes":{},"isUserAuthenticated":1,"displayName":"aahad"},"wl_antiXSRFRealm":{"userId":"3l6ap8g9t4h9uk5rb1fmqfok15","attributes":{},"isUserAuthenticated":1,"displayName":"3l6ap8g9t4h9uk5rb1fmqfok15"},"wl_deviceNoProvisioningRealm":{"userId":"57B167E4-1258-4AD7-9DA1-92DC66A0451E","attributes":{"mobileClientData":"com.worklight.core.auth.impl.MobileClientData@6a76de98"},"isUserAuthenticated":1,"displayName":"57B167E4-1258-4AD7-9DA1-92DC66A0451E"}},"notificationSubscriptionState":{},"gadgetProps":{"directUpdate":{"updateUnpackedSize":1014255,"availableSkins":["default"],"checksum":4077143359,"updateSize":290080},"ENVIRONMENT":"iphone"},"userInfo":{"wl_authenticityRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"SampleAppRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_remoteDisableRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null"},"PushAppRealm":{"userId":"aahad","attributes":{},"isUserAuthenticated":1,"displayName":"aahad"},"wl_antiXSRFRealm":{"userId":"3l6ap8g9t4h9uk5rb1fmqfok15","attributes":{},"isUserAuthenticated":1,"displayName":"3l6ap8g9t4h9uk5rb1fmqfok15"},"WorklightConsole":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_deviceAutoProvisioningRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_deviceNoProvisioningRealm":{"userId":"57B167E4-1258-4AD7-9DA1-92DC66A0451E","attributes":{"mobileClientData":"com.worklight.core.auth.impl.MobileClientData@6a76de98"},"isUserAuthenticated":1,"displayName":"57B167E4-1258-4AD7-9DA1-92DC66A0451E"},"myserver":{"userId":"aahad","attributes":{},"isUserAuthenticated":1,"displayName":"aahad"},"wl_anonymousUserRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null}}}*/
Mar 27 11:24:12 Appsdev-iPhone PushApplication[211] <Warning>: [LOG] wlclient connect success
Mar 27 11:24:12 Appsdev-iPhone PushApplication[211] <Warning>: [LOG] before: app init onSuccess
Mar 27 11:24:12 Appsdev-iPhone PushApplication[211] <Warning>: [LOG] after: app init onSuccess
Mar 27 11:24:12 Appsdev-iPhone PushApplication[211] <Warning>: [LOG] wlclient init success
Mar 27 11:24:12 Appsdev-iPhone PushApplication[211] <Warning>: Could not register for remote notifications: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0xfeafba0 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}
Mar 27 11:24:12 Appsdev-iPhone PushApplication[211] <Warning>: [ERROR] Error while trying to retrieve device token from the mobile operating system.
见附件快照。
see attached snapshots.
要生成APNS的步骤:
The steps to generate APNS:
-
登录到Apple帐户选择应用程序ID - >配置 - >启用推
Logged on to Apple Account select App ID ->Configure -> Enable Push
选择的发展推SSL证书
Selected Development Push SSL Certificate
复制到工作灯,在App文件夹的根在应用descriptor.xml同级别
copied into Worklight, on the root of App folder at the same level of application-descriptor.xml
提供pushSender密码,并给予securityTest
provided pushSender password and given securityTest
感谢
推荐答案
@Idan,
其现在已经得到解决。有两个原因:
Its resolved now. There were two reasons:
- 复制工作灯应用程序文件夹内APNS证书后,必须重新生成和放大器;部署所有。然后,您必须在WL CONSLE部署wlapp .......就是没有做。
- 我用iPhone环境一个错误的自定义安全领域的封锁WL服务器响应返回到设备。
希望这个信息可以帮助其他面临类似的问题。
Hope this info will help others facing similar issues.
感谢
这篇关于工作灯WL.Client.Push.onReadyToSubscribe不是被解雇的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!