simulating app upgrade in iOS

牧云@^-^@ 提交于 2020-01-22 15:09:48

问题


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:


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:


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.



来源:https://stackoverflow.com/questions/12468180/simulating-app-upgrade-in-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!