iPhone:应用程序在特定设备上崩溃
不久前,我向应用商店发布了一款应用。我使用模拟器和我的 iPhone 3GS(不幸的是我还没有 iPhone 4)对其进行了测试 - 即使在频繁使用后也很少发生崩溃。
-
出了什么问题:
一些评论表明它在 iPhone 4 上崩溃(可能是在启动时) - 我也注意到我的其他几个应用程序也出现了这种情况,这些应用程序的下载量并不多。
我无法调试这些崩溃 - 但是在特定设备上频繁崩溃可能是什么原因(可能只是 iPhone 4 - 虽然不确定 - 尽管我认为在审查时是用 iPhone 4 进行测试的)?我的应用程序没有使用任何特殊的框架或 API 方法,运行时占用的内存也很少。这些崩溃是否有可能发生在越狱设备上?目前还没有 iTunes 连接崩溃报告。
-
TLDR:应用程序在特定设备上崩溃,无法复制。不知道从哪里开始 - 有帮助吗?
-
另外:如果有人感觉特别慷慨并想确认它是否适用于 iPhone 4,那么你可以尝试我的应用程序(它是免费的)- 应用商店链接 - 我将非常感激!否则,特定设备可能导致应用程序崩溃的任何原因都会很棒,或者任何有类似经历的人都会很好 - 当我无法复制错误时,我什至不知道从哪里开始。
Not long ago, I released an app to the app store. I tested it using both the simulator and my iPhone 3GS (unfortunately I don't yet have an iPhone 4) - very few, if any crashes happened even after frequent use.
-
What's wrong:
Some of the reviews suggest that it is crashing on iPhone 4 (possibly on startup) - I have also noticed this with several of my other apps, which don't have very many downloads.
I have no way of debugging these crashes - but what possible reasons may there be for frequent crashing on specific devices (possibly just iPhone 4 - not definite though - although I would think it is tested with iPhone 4 when being reviewed)? My app uses no out of the ordinary frameworks or API methods, and very little memory when running. Is it possible that these crashes are occurring on Jailbroken devices? No iTunes connect crash reports as of yet.
-
TLDR: App crashes on specific devices, can't replicate it. No ideas where to start - Help?
-
Also: If anyone's feeling particularly generous and wanted to confirm whether or not it works on iPhone 4, then you could try my app (it's free) - app store link - I'd be very grateful! Otherwise any reason that specific devices may crash the app would be great, or anyone that's had a similar experience - I just don't even know where to start when I can't replicate the bug.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的,我找到了你的问题::-)
这是区域设置导致它崩溃 - 使用德国,它会崩溃,使用美国,它会很好。所以看起来像是解析问题。
Ok, I tracked down your problem: :-)
It's the region settings that make it crash - use Germany and it will crash, use US and it will be fine. So looks like parsing problem.
这是我经历过的最愚蠢的事情。是的,部分问题是由于设备的位置造成的,但这不是主要原因。
如果您在应用程序中的某个位置使用 NSDateFormatter,那么它就会崩溃。例如,就我而言,这是因为 24 小时和 12 小时系统。在美国格式中,默认时间格式为 12 小时制,带有 am &下午。
在我的代码中,我试图访问从 [formatter stringFromDate:date] 获取的字符串的 am 和 pm 部分,但在 24 小时系统的设备上没有这样的东西可以访问。所以它会使应用程序崩溃。
在非美国国家/地区,NSDate 的默认格式不是 24 小时制。
在尝试访问 NSDateFormatter 的任何部分之前,请确保定义了 NSDateFormatter 的格式。
This is the most stupid thing that ever happened to me. Yes, part of the issue is because of location of the device, but this is not the main cause.
If you are using NSDateFormatter some where in your app, that's where it crashes. For example in my case it was because 24hr and 12hr systems. In US format the default time format is in 12hr system with am & pm.
In my code I was trying to access the am and pm part of the string that I was getting from [formatter stringFromDate:date] and on device with 24hr system there was no such thing to access. so it would crash the app.
It was happening in non-US countries that the default format of the NSDate is other than 24hr system.
Make sure you define the format of the NSDateFormatter before trying to access any part of it.