我正在开发一款从谷歌阅读器下载新闻的应用程序。该应用程序在iPhone模拟器上运行完美,但当我在手机上尝试它时,当我尝试从其他来源获取新闻时应用程序崩溃(应用程序重新加载新闻和解析xml文档)。 问题是我可以收到有关问题的信息,因为它在模拟器中崩溃之前它完美无缺。所以我的问题是如何调试以获取有关的信息? 可能问题是该设备没有那么多内存......但我不确定,我不想知道更多信息。 我可以用哪种方法?仪器? 附:我正在使用xcode 4
**编辑! 我无法解决错误......我尝试使用乐器......在您看来,如果应用程序在模拟器中运行良好但在重新加载一些新闻后崩溃(2次之后)会出现什么样的错误?
**编辑 我获得了更多关于:
的信息Sep 6 23:06:13 unknown NewsPad[2534] <Warning>: -[GoogleReader feedParser:didParseFeedItem:]
Sep 6 23:06:13 unknown NewsPad[2534] <Warning>: MWFeedItem: “Apple Tv e Spotify: Combinazione vincente” - 2011-07-20 09:37:17 +0000
Sep 6 23:06:13 unknown NewsPad[2534] <Warning>: -[GoogleReader feedParser:didParseFeedItem:]
Sep 6 23:06:13 unknown NewsPad[2534] <Warning>: MWFeedItem: “Partecipa al concorso Original iPhone Film Festiv…” - 2011-07-20 08:58:54 +0000
Sep 6 23:06:13 unknown NewsPad[2534] <Warning>: -[GoogleReader feedParser:didParseFeedItem:]
Sep 6 23:06:13 unknown NewsPad[2534] <Warning>: MWFeedItem: “Arriva Roku 2” - 2011-07-20 07:57:13 +0000
Sep 6 23:06:13 unknown NewsPad[2534] <Warning>: -[GoogleReader feedParserDidFinish:]
Sep 6 23:06:14 unknown MobileMail[2503] <Warning>: Received memory warning.
Sep 6 23:06:14 unknown SpringBoard[15] <Warning>: Received memory warning.
Sep 6 23:06:15 unknown UserEventAgent[12] <Notice>: jetsam: kernel termination snapshot being created
Sep 6 23:06:15 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.apple.mobilemail[0x774d]) Exited: Killed: 9
Sep 6 23:06:15 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.apple.mobilephone[0xffde]) Exited: Killed: 9
Sep 6 23:06:15 unknown SpringBoard[15] <Warning>: Application 'Mail' exited abnormally with signal 9: Killed: 9
Sep 6 23:06:15 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.PaoloSmedile.NewsPad[0x69e6]) Exited: Killed: 9
Sep 6 23:06:16 unknown SpringBoard[15] <Warning>: Application 'Telefono' exited abnormally with signal 9: Killed: 9
Sep 6 23:06:16 unknown SpringBoard[15] <Warning>: Application 'NewsPad' exited abnormally with signal 9: Killed: 9
Sep 6 23:06:17 unknown kernel[0] <Debug>: launchd[2540] Builtin profile: MobileMail (sandbox)
Sep 6 23:06:17 unknown ReportCrash[2539] <Error>: Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2011-09-06-230617.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
我必须做什么?
答案 0 :(得分:0)
在管理器中,您可以获取崩溃的设备日志,还可以从设备中查看控制台。
您也可以尝试在模拟器中模拟内存警告。
在Xcode中的Edit Scheme选项下打开内存警告,但僵尸仅用于模拟器。
使用Analyzer编译您的应用并修复所有警告。
答案 1 :(得分:0)
Set breakpoints on exceptions并在Xcode调试器中在您的设备上运行应用时重现。