使用 Phonegap for Ios 实现 Urban Airship 在注册时卡住了
Posted
技术标签:
【中文标题】使用 Phonegap for Ios 实现 Urban Airship 在注册时卡住了【英文标题】:Implementing Urban Airship with Phonegap for Ios get stuck on registering 【发布时间】:2011-10-26 18:43:08 【问题描述】:我正在尝试使用电话间隙实施 Urban Airship,并遵循以下网址中的所有内容:
https://support.urbanairship.com/customer/portal/articles/66970-implementing-with-phonegap
应用程序启动后,我无法注册。在我点击注册按钮后。
我的设置是 Xcode 4.2 Build 4D199,我使用的是 Phonegap 1.1.0。
如果有人需要更多信息来帮助我解决这个问题,请告诉我。谢谢。
以下是我的xcode控制台日志
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Fri Sep 16 06:56:50 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys000
target remote-mobile /tmp/.XcodeGDBRemote-138-25
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
[Switching to process 11523 thread 0x2d03]
[Switching to process 11523 thread 0x2d03]
sharedlibrary apply-load-rules all
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/info/dns.so (file not found).
warning: No copy of dns.so found locally, reading from memory on remote device. This may slow down the debug session.
2011-10-26 11:34:19.837 UAPhoneGap[2395:307] active
[Switching to process 12803 thread 0x3203]
2011-10-26 11:34:21.250 UAPhoneGap[2395:307] Device initialization: DeviceInfo = "name":"Michelle W’s iPodTouch","uuid":"beb3dbb33a034930cffc6bb80e754e9174db9c40","platform":"iPod touch","gap":"1.1.0","version":"4.2.1","connection":"type":"wifi";
【问题讨论】:
【参考方案1】:我终于想出了如何解决这个问题。问题是我运行的是Phonegap 1.1.0,而此处列出的UAPhoneGap 示例https://support.urbanairship.com/customer/portal/articles/66970-implementing-with-phonegap 运行的是Phonegap 1.0.0。
为了解决这个问题,您只需将 phonegap1.0.0.js 替换为 phonegap1.1.0.js 并在 index.html 中替换对它的引用。
不要忘记将 go.urbanairship.com 添加到 phonegap plist 中的外部白名单中。
【讨论】:
以上是关于使用 Phonegap for Ios 实现 Urban Airship 在注册时卡住了的主要内容,如果未能解决你的问题,请参考以下文章
PhoneGap 上的 OneSignal for iOS 不注册设备
CanvasCamera for iOS PhoneGap / Cordova
使用 Android 和 ios 的 phonegap 的默认共享 [关闭]