Debug an iOS app while keeping existing data - ios

I'm currently having a problem with an iOS app that we've only observed in production, in the App Store version.
I'm trying to test it by debugging a development version of the app from Xcode, with the same Bundle ID and everything, but it removes the existing App Store app before running the development version, hence removing all traces of the bug.
Is there any way to instruct Xcode not to remove an existing app when debugging?
P.S. My app is a Cordova app. I already tried attaching a Safari Web Inspector, but it turns out it doesn't detect published apps.

Related

How do I test code that runs on update for IOS apps?

My app contains code that must modify the DB in the documents directory on update of the app (because the structure of the DB has changed between versions).
The loading of the new version of the app to a phone via xcode works fine, and runs the code correctly. However I'm concerned that this may not exactly mirror what happens when updating via the app store on the phone.
In order to properly test that this code runs correctly when a user updates their app through the app store, I gather it used to be possible to load the app via an ad hoc distribution, which would install it as if it were an update from the app store. The (rather old) instructions for that are here:
https://developer.apple.com/library/archive/technotes/tn2285/_index.html
I attempted this, by exporting the ad hoc .ipa file and dragging onto the device in ITunes, only for it to tell me the app is already installed. The .ipa file contains the updated app and it has a higher version number than the one installed on the device.
Do I need to do this another way? Or is loading the app via xcode sufficient to emulate what the user's phone will do when updating the app?
Thanks

iOS app has bugs when updated it on iTunes Connect

I have a strange problem with my app. I have finished the design and I am ready to update it on the store however, when I do that and I test my app using test flight the app is completely different from the version installed from xcode.
Some colors are different the are bugs that are not present when testing it on xcode and even the status bar that I have hidden is now visible..
I have other apps on the store and i never experienced this isuues and I am sure that I am uploading them right version of their app..
What could be going wrong?

Does installing an iOS app via TestFlight simulate an app upgrade?

I read in this Stackoverflow question that to simulate an app upgrade on an iPhone, you should install a new Ad Hoc IPA of the file via iTunes.
You can therefore check if the users data is still intact after an update.
I use TestFlight and quite often install new development versions of the app from there. Does this also simulate an app update?
You can test this by saving some data from the app, and doing the TestFlight upgrade. If the data are still there, then I think that shows that it does behave like an app upgrade.
When I did these sorts of updates, I think the data stayed, but I recommend testing to be sure.

How do you create a new version of an app for testing with updates (iOS)?

I'm fairly new to app development, and I just recently put my first app in the App Store. I noticed some bugs after it was released, and when I tried to test it, it overwrote the version I had downloaded from the app store. I have the app connected to Game Center, so I want to avoid setting a high score while I am testing. Normally, in the test version I am logged out, and it has my ID saved for the App Store version, so it auto logs in for that version. However now that the new version has been overwritten, I can't login at all.
How do I keep them separate?
Change the bundle id like com.company.game to com.company.game2 or so

Testing app on iphone via xcode replaces my app (which is downloaded from app store)

I want to be able to have 2 versions of my app on my phone. The one that is published on the App Store and the one that i use to test on my iphone via xcode. Unfortunately when i run my app on my iphone with xcode, it replaces the one i downloaded from the app store.
Is it possible to have both versions?
Change Bundle identifier of your project to something else. You can find it at info.plist

Resources