6

I am trying to simulate an upgrade from version 2.0 to 2.1. I have version 2.0 hosted in testflight, so I did install it in my device. Then I tried running the app from xcode. However what happened is that the app did not get overlapped, instead it created two apps with the same name. How can I make it such that when I run the app from xcode it overlays the old version?

I've made sure that the bundle identifier is the same.

1
  • 3
    Double check the bundle ID's. These are how iOS determines wether an app is already installed or not. Sep 17, 2012 at 23:01

2 Answers 2

12

Well the info you can get while updating can be found @ this link here.

when user updates an app, Documents folder is stored as is, including NSUserDefaults (but, sometimes user download app via iTunes and replace the whole application, crying 'OMG! update killed all my levels progress!'); Application bundle is erased and replaced by new one (anyway, it is readonly for user); Re-deployment of new build version will be enough;

You can't access the appstore inside the simulator because: @ link here

It's a simulator not an emulator. Even if there was an App Store in the Simulator, none of the apps in the store would work since they are compiled for ARM CPUs while the Simulator runs x86 code.

Another stack overflow @ link here states:

Build and install your old version, generate some data, and then install the new version on top of it.

For testing before submitting to the Appstore I generally download from the AppStore again the old version, and then install with Xcode the newer version - for your next update... ;-)

And another stack overflow (that I lost the link for) states:

No, the simulator runs i386 binaries and iPhone appstore apps are ARM binaries apps.

iOS apps are compiled to machine code, Android apps are run in a Virtual Machine using byte code and are translated to machine code at the time they are run.

So no, I don't believe you can run it in the simulator, how ever you can have older projects saved on the iPhone and test both out. And the apple documentation is @ this link here.

2
  • 1
    also if I upgrade using this method, download the app from test flight and then run the app from xcode.. will I lose all data stored in core data?
    – adit
    Sep 18, 2012 at 0:10
  • I'm not an expert in core data, but i don't think so, just copy your app, create a new project, call that project yourprojectnamehereTest. Sep 18, 2012 at 0:15
0

Read this: https://developer.apple.com/library/ios/technotes/tn2285/_index.html

You cannot simulate update in XCode (neither in simulator or connected device). You have to create IPA file and simulate update process via iTunes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.