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

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.

Related

Since iOS 13 - A lot of app deletions in App Store Connect, can anybody check if this happens with your App as well

I donĀ“t see any problems like crashes or that the DAU number has changed, but App Store Connect shows 3 times more deletions since the release date of iOS 13. Now I don't know if there is any problem in the App or if Apple has made an upgrade of the "App-Offloading" mechanism? So it would be good to have some feedback, if the app deletion numbers have changed for somebody else as well.
Low-memory phones are prompted to delete all apps before the upgrade.
One of my colleagues has a 6S that is chock-full of photos. When she upgraded she was told that all of her apps would stored in the cloud but deleted on the phone, to make room. After the upgrade, she still had all the app icons, but those were really just shortcuts to re-download each app anew.
Apparently this also kills notifications, because without the app on the device there's nothing to execute the notification.
I have that message in App Store Connect:
App deletions data was reported incorrectly for iOS and tvOS as of
August 2019. This data has been removed from the dashboard for
reprocessing and will be re-enabled once reprocessing is done.
See attached screenshot:

How to debug an iOS app that does not make it past launch for certain users?

I have hundreds of people using my app, but a handful are reporting that the app does not make it past the black launch screen (it immediately closes, before entering into my app). I'm using Crittercism but it's not even getting far enough to catch any exception, which makes it sound like a springboard / backboard problem.
Here's what I've asked the users to do:
Reinstall the app
Delete some apps (to free some space)
Restart the device
None of the above worked. I'm completely at a loss as to what's wrong. The app is in the AppStore and works fine for most users. Furthermore, I can't find anything unique about these users (they're using recent versions of iOS with fairly modern hardware).
Crittercism doesn't show anything, because after the crash - log will be send only at the next launch, so if user doesn't open your app anymore (or can't do it, because he has constant crash).
I advice your to try next ideas:
Do use use keychain or store smth there? It's not cleared after uninstall
Maybe your data is backed up in icloud
Did it begin with the new iOs version (9.0 for example)
Maybe it's some cache problem after installing one version on another,
Can it be the problem of different timezones
Can it be a crash with local settings
If you have feedback with users with crash - contact them and ask about device, iOs version and other
your have crash sections in your itunesconnect profile, maybe there you'll get some information

Retrieve Code from App on the APP Store

I have had my Mac stolen but even worse they stole my Apple Time Machine. I have an App available on the App Store, is there anyway I can retireve the source code so that I can release updates/bug fixes ? I know I should have backued up in the cloud, lesson learned !
Unfortunately not. When you upload your app to the store, the code is compiled into a binary. There is no way to retrieve your code because it is not there.

App Crashes When Downloaded From App Store But Not When Testing

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.

How to reinstall an app without losing NSUserDefaults?

I have an iOS game that saves game progress using NSUserDefaults. After the last update a user had a problem, the app was not working anymore on this device. The app doesn't have any problem, but for some reason an error occurred while downloading the app, not quite sure what happened.
The point is, the app must be deleted and reinstalled. Can this be done without erasing NSUserDefaults?
I tried syncing with iTunes here after deleting the app, even installing it again through iTunes but I was unable to restore the previous saved game on my test devices.
I guess the only way to reinstall the app is through an app update. When it comes out he will update and will not lose any data. Is this correct? Or is there any other way to do this?
I'm working to implement cloud syncing on the next update, so this problem should not be an issue again :). But right now, is there anything and I do to this user?
Cloud sync would be the solution. If you using your iPhone only once the app is deleted every thing related to it is gone with no easy way to retrieve it.
Or just store data that needs to be persistent in the keychain.
Restoring the device from an iTunes Backupd probably reinstalls the app and also keeps the NSUserDefaults, assuming they are included in the backup.
However, this needs to be done by the user ...
Some syncing option is the better solution on the long way.

Resources