如何在 Windows 上调试 iPad Flash 应用程序?
可能的重复:
调试设备上的 iOS/AIR 内容
我正在移植我的 Air应用程序到iPad。我编译它:
adt -package -target ipa-ad-hoc -storetype pkcs12 -keystore store.p12 -storepass ****** -provisioning-profile profile.mobileprovision app.ipa app.xml app.swf
应用程序通过 iTunes 部署在设备上。当我在 iPad 上启动应用程序时,出现黑屏。看起来好像抛出了一些异常或类似的东西。我如何才能看到该异常?或者更一般地说,你们如何在 Windows 上调试 iOS 应用程序?
Possible Duplicate:
Debugging iOS/AIR content on the device
I'm porting my Air app to iPad. I compiled it with:
adt -package -target ipa-ad-hoc -storetype pkcs12 -keystore store.p12 -storepass ****** -provisioning-profile profile.mobileprovision app.ipa app.xml app.swf
App was deployed on device through iTunes. When I launch app on iPad I get a black screen. Looks like some exception is thrown or something like that. How can I see that exception? Or if to be more general, how do you guys debug iOS app on Windows?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,无法使用 AIR 和 iOS 进行远程调试。因此,您必须恢复在某处创建滚动文本字段并在那里显示日志/调试文本。编辑:请参阅调试设备上的 iOS/AIR 内容。
Edit2:通过 Flash Prof CS5.5 在 iOS 上进行调试的简短教程视频: http://www. youtube.com/watch?v=DanNBN89uhs
您可以使用 uncaughtErrorEvents 属性(在主文档 loaderInfo 属性中找到)来捕获任何未处理的错误并将其显示在文本字段(请参阅 http:// help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/LoaderInfo.html#uncaughtErrorEvents)
还可以定义编译器常量将调试日志语句包含在操作脚本中,以便您可以轻松地打开和关闭它们。
我通常还会先在 Windows 上测试该应用程序,然后再创建它的 iPad 版本。
最后提示:请记住,只有主 swf 才能包含动作脚本。
编辑:
这是一个示例,尝试在执行任何其他动作脚本之前添加此代码:
As far as my knowledge goes there is no remote debugging with AIR and iOS possible. So you have to revert to creating a scrolling text field somewhere and show log/debug texts there.Edit: See Debugging iOS/AIR content on the device.
Edit2: Short tutorial video on debugging on iOS via Flash Prof CS5.5: http://www.youtube.com/watch?v=DanNBN89uhs
You can use the uncaughtErrorEvents property (found in your main documents loaderInfo property) to catch any unhandled error and show it also in the text field (see http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/LoaderInfo.html#uncaughtErrorEvents)
There is also the possibility to define compiler constants to enclose debug log statements within actionscript so you can easily turn them on and off.
I normally also test first the application on my windows before creating an iPad version of it.
Final tip: remember that only your main swf can contain actionscript.
Edit:
Here is a example, try to add this code before any other actionscript is executed:
您使用的是 Air 2.7 还是 3.0?当我使用用 alchemy 构建的库时,我遇到了这个问题。由于某种原因,使用 alchemy 库导致出现黑屏。远程调试也对我没有帮助,因为它是最重要的。我通过不包含 alchemy 库来修复它(该库用于快速 JSON 解析)
Are you using Air 2.7 or 3.0? I had this issue when I was using a library built with alchemy. For some reason using the alchemy library caused a blank screen. Remote debugging didn't help me either because it was before everything. I fixed it by not including the alchemy library (the library was for fast JSON parsing)