App Crashes When Downloaded From App Store But Not When Testing - ios

I have a serious issue which I cannot seem to solve.
Recently I have made an update to an IOS app, and when testing in XCODE as both Ad-Hoc, Debug, and installing via the .IPA on a device the issue cannot be replicated. However when I download the app from the App Store, it crashes.
Does anyone know how this could happen, and any potential solutions? I am getting lots of complaints from users, and not sure what to do?
Could part of the binary upload have got corrupted?

Probably you always compiled your app in debug mode. But when sent to App Store you made a release compile. click the arrow in the run button select scheme and chose "release mode" and run your app it will probably crash.
check if you used NSParameterAssert as they are not called in release mode

I cannot say why your live App Store application is crashing and the debug version is not. Two possible solutions:
Crash reports:
To find out why your application crashed, you might want to check if there are any crash reports available on iTunes Connect. Log in on iTunes Connect and click on your application. Scroll down to Crash Reports. You will find out more about why your application is crashing here.
More information about crash reports here at Apple's own iOS Developer Library.
Prerelease your app with TestFlight: For in the future: test your application by uploading it on iTunes Connect and testing it with TestFlight first before submitting the application to the iTunes Store. This will save you a lot of (review) time if you find a error.

I realize this is an old thread but I had the same issue with my App that I released. Meaning it worked fine in testing, but when I released it it would crash. The culprit ended up being the fact that I am using In App Purchases. I have two items that can be "bought" but I had only enabled one of them. In testing it was able to read both of them, but with the release version, it was only pulling the one that was enabled down, creating the crash. The fix was simply enabling the disabled item. I didn't even have to redistribute the app, though I had to wait for it to "percolate" through... Anyway this may help someone in the future.

Check if your app is looking for too many IAPs.
I just had this problem and my problem was I had deleted an IAP from the App Store, but didn't remove it from the app code.
For some reason it only crashed when downloaded; I used a promo code to do this before launching my app.
Thanks to Tornado for the inspiration to try this variation.

Related

Xamarin IOS app, iCloud restore doesn't work once on App Store

My IOS app is now on the Apple App Store. I tested it like crazy before it was put on the App Store and I am sure Apple did as well, but now that it is on the App Store, when I install it from there, the restore function I wrote to restore the applications data from iCloud does not work. The backup function works, as I can see the iCloud usage on my phone for my app contains 78mb of data, but the restore does not work at all, it just goes back to the home page. I have no idea why as I get nothing reported on the crash.
2 questions
IS there a way to look at why it is crashing on my phone
Any idea why it would stop working once installed from the App Store when it must have worked for apple when they tested it and worked for me as well before on the App Store?
It turns out that I was mistaken about the restore failing. Well, it is failing, but the reason it is failing is because the backup is failing on each record, so nothing is created on iCloud to be read by the restore code. I have asked on a couple channels for help on what to do for writing to iCloud when the code is built in release mode, but have yet to receive any help. My code works perfectly in Debug, just not in release mode.

How to track production app bugs/crashes from all devices in iOS without using any third party libraries

I have one requirement like I have to track all the bugs and crashes from my production app of App Store from all devices.
I have idea tracking bugs or crashes by using Crashlytics library by integrating to my iOS project. And I have seen some other libraries too to achieve this.
But, my requirement is without using any third party library, I have to achieve this task.
And I know printing all the logs inside the apps and forwarding them to server by API call, but, if application gets crash app can't execute any code except Terminate delegate method. Even though we can't able to call the api request.
Can anyone suggest me, how to achieve this? I want implement this in Swift.
Finally found the answer from Apple docs.
About Crashes organizer
Use the Crashes organizer to view crash reports generated by the report service for apps that you distribute using TestFlight or distribute through the App Store.
Important: For apps released in the App Store, the user must agree to share user crash and energy data with developers. (TestFlight users automatically share these logs with developers.) Only the Team Agent or Admin role, or an App Store Connect user can view these reports.
To view crash reports, choose Window > Organizer, then click Crashes. Xcode begins refreshing the crash reports for the selected app version, including embedded app extensions. Xcode downloads the top crash reports—crash reports with the most number of occurrences on unique devices—that occurred during the past two weeks. However, there may be up to a one-day delay between when you first distribute your app and when crash reports are available in Xcode.
For more information, check here by clicking this link
https://help.apple.com/xcode/mac/current/#/dev861f46ea8
as per my knowledge if you have created an archived build from your machine and uploaded it to app store then you can open Windows -> Organizer from Xcode tool options, then in Organizer you can select the Crash tab at the top, you can see its automatically downloads the crash information if it has linked with developer account. Also in itunes connect also you can check the reports.

updating my iOS app in appStore - Signiant Transfer Engine warning - app got rejected

I've submitted and updated my app successfully several times. Now when I'm uploading my app via XCode Organizer (not application Loader) I receive the following warning (3 times):
"Creating a new Signiant Transfer Engine because the previous transfer had to be canceled. This session is at risk of running out of available system resources."
First I didn't think much about it, but today the App got rejected by the App Store reviewer because it crashes on launch on the iPad air they use to test on.
Any ideas how this can be solved?
I found this discussion here: Application Loader, new weird warning about Signiant Transfer Engine which suggests to change the preferences in Application loader. But because I have not uploaded my App via application loader from the beginning I cannot use application loader to update it (at least I couldn't figure out how), so it doesn't help me.
What else could be going wrong? Any ideas welcome!
update: the app validates without errors and warnings. when uploading it it takes much longer than usual before I get the warning mentioned above. I have tested the app on multiple devices. Also the app is actually not targeting iPads, it's mainly made for iPhone/iPodtouch.
It works fine on all. The link above suggests that not all files are uploaded correctly when the error message occurs. So that could be the problem. But the question is how to change it...
I'm not sure, but I don't think the warning has anything to do with the crash or your app being rejected.
You could file a TSI with Apple, but I would try to find the crashing bug first. https://developer.apple.com/support/technical/submit/

How to enable crash report submission to iTunesConnect from iOS App?

I was using Evernote and it crash once, So after crashing I reopen it and it ask me for submit crash report to developer.
After some googling I have found in my iTunes Connect Account in Application detail there is one option called Crash reports.
So my conscience is that how to enable crash report submission in Application.
If the app asks for sending crash reports this has nothing to do with iTunes Connect.
The reports you see in iTunes Connect are send automatically by the phone (or iTunes?) when the user has agreed to send diagnostic reports when they set up their device. This happens automatically, you don't have to configure anything at all. Just go to iTunes Connect and get the crash reports.
But to be honest, iTunes Connect crash reports seem a little bit unreliable. If you see them at all it takes almost forever until you see them. Another culprit is that you have to check for new reports manually.
So Evernote, like basically everyone else, switched to a 3rd party service for crash reporting.
I use crashlytics in my own apps. But there are many others.
A good read might be Ray Wenderlichs Overview of iOS Crash Reporting Tools: Part 1/2 and Part 2/2
Some personal experience:
Since my apps don't crash often I usually see "Too few reports have been submitted for a report to be shown." in iTunes Connects crash reporter. But when I open the console of crashlytics is see 6 different crashes right now. Most of them affect only two or three people but it's good to be aware of new issues, even if few people are affected.
iTunes Connect does not show crash reports for prerelease versions of iOS. But it happened that I had a horrible bug in my app that lead to a crash instantly after people opened the settings of my app on a prerelease version of iOS. After the first crash report came in via crashlytics I fixed that bug and submitted an update. Because I didn't have time to test against the first betas it would have taken a while to be aware of this crash if I had relied solely on iTunes Connect.

How to get the Crash Log from Apple?

We developed an app, and it works perfectly on several different emulators and devices, not once crashed, but both times we tried submitting to Apple it gets back to us as "2.1 - apps that crash are rejected" (or something).
I cant seem to find the log from them, or any additional infos. Is the crash log available anywhere? Or just ANY info? They only say that it crashed on an iPad 3rd Gen with iOS 6. We ran on a device like that and it didnt crash for us.
Unfortunately, Apple doesn't provide detailed logs of their review process, although crash logs are sometimes provided, as indicated by #jsd in the comments below.
In theory, crash reports get synchronized with iTunes and can be collected by Apple and provided to you via iTunes Connect, but in practice, that rarely works - or only with large delays.
However, you could integrate some Crash Reporting into your App. Here are a few services that allow you to do that without much hassle:
HockeyApp
Crittercism
BugSense
TestFlight
Crash reporting integration in production versions of my apps have been proven to be very helpful, so I'd highly recommend this. Good crash reporting services provide an SDK to be included in your app, and generate symbolicated, readable, ready-to-use crash reports that make tracking bugs very easy.
As for the cause of your app's crash, here are some basic guesses:
Do you use ARC (Automatic Reference Counting)? You should.
Did you run the Static Analyzer in Xcode (Product ➞ Analyze)?
Did you test with different environments (e.g. internet connection via 3G, WiFi or none at all)?
Have you deleted and reinstalled the app on your device, or did you just update it?

Resources