gpt4 book ai didi

ios - Worklight WL.Client.Push.onReadyToSubscribe 未被解雇

转载 作者:行者123 更新时间:2023-11-29 04:02:56 25 4
gpt4 key购买 nike

我遇到了 Worklight 推送通知的问题。

我遵循了 Worklight 5.0.5 Module_41_-_Push_Notifications 的所有步骤。PDF文件,并做了Push demo。

我遇到一个错误,指出:

[ERROR] Can't subscribe, notification token is not updated on the server

尽管在控制台上它确实显示了设备 ID。我的假设是 WL.Client.Push.onReadyToSubscribe 不会被解雇。

有人遇到了类似的问题。 https://www.ibm.com/developerworks/forums/thread.jspa?threadID=456501

我已经设置

<pushSender password="Your_Password"/> 

并多次重新生成和部署应用程序,但没有任何好处。

欢迎任何帮助或建议。

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 码头时。我正在下面。

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.

请参阅随附的快照。 enter image description here enter image description here

生成APNS的步骤:

  • 登录 Apple 帐户,选择应用 ID -> 配置 -> 启用推送

  • 选定的开发推送 SSL 证书

  • 先生成新的 CSR,然后获取证书
  • 双击证书并从钥匙串(keychain)中选择此新证书及其私钥,然后右键单击并导出并另存为apns-证书-sandbox.p12
  • 复制到 Worklight 中应用程序文件夹根目录下的 application-descriptor.xml 的同一级别

  • 提供了pushSender密码并给出了securityTest

谢谢

最佳答案

@伊丹,

现在已经解决了。原因有两个:

  1. 将 APNS 证书复制到工作灯应用程序文件夹内后,您必须重新生成并部署所有证书。然后,您必须在 WL 控制台上部署 wlapp……那是没有做的。
  2. 我在 iPhone 环境中使用了错误的自定义安全领域,导致 WL 服务器无法响应设备。

希望这些信息能够帮助其他面临类似问题的人。

谢谢

关于ios - Worklight WL.Client.Push.onReadyToSubscribe 未被解雇,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15652388/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com