iPhone: App crashes on specific devices
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 o开发者_开发技巧n 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.
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.
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.
精彩评论