Why does Trigger.IO app need to be uninstalled when upgrading on iOS? - iphone

I'm testing a Trigger.IO app built with Forge v1.4 on an iPod running iOS 6. I've been installing the .ipa through a distribution provision profile.
Occasionally, after installing an updated version, the app would launch but not run correctly. I traced this behaviour to the window.forge being absent, presumably due to a bad initialization. I would then make sure to kill the app process before installing updates and my recollection is that this seemed to make the problem go away.
Now, I've added the Facebook and Splash modules and my app now consistently won't go past the splash screen after I install an upgraded version unless I forcibly uninstall the old version first. Presumably, it dies before creating the webview. Any idea why I would need to uninstall my app first before upgrading? Is this a known behaviour?
I want to make sure that my users don't experience this when upgrading.
My app runs happily without Forge, and doesn't have any particular dependencies on localStorage data. I don't have a Mac and have been installing via iTunes in Windows, so I don't think I can access logging information.

You should have a look at this post:
How application get update from apple store?
The quick answer is when you update an app, you install the new bundle but you keep the user data stored previously such as a local DB. If you changed the local DB in the new app (or anything else) your app can crash when updated but is fine when downloaded from scratch.

Related

Failed to install ad-hoc distribution with itunes 11.0.1

I have strange problem. I developed app code signed it with Distribution provisioning profile which includes correct devices and sent it to Client. He installed via iTunes and there were no problems. Suddenly iTunes 11 was released and Client told me that he is unable to install app on his devices.
The situations looks like this:
authorizing computer
adding app to iTunes library
selecting app to sync/install on device
start synchronization
Synchronization goes to step 4 where message says thet apps to synchronization are prepared and synchronization ends showing in iTunes that app is installed on device. But on device there is no app. No error or any kind of message, nothing...
To make things more complicated I'm able to install app on my devices (I even borrowed iPad's, iPhones and one iPod touch from friends to check it). Although I'm not able to install it on one iPod Touch 4G. The app is compatible with iOS 5 and 6.
Any ideas?
Same issue i was facing, i don't why iTunes 11 has this strange behaviour. But i managed to sent my .ipa to client using, Diawi. You have to upload your .ipa over here and it'll generate a link which will pass to your client and it'll be download easily. So this is simple and nice solution without interacting with iTunes.
Similar situation to me. iTunes 11 (OSX 10.8) failed to install IPA file. Everything seems all right, but there is no app on device, iPhone4 iOS6.0.1 in this case.
But when I install app via Test Flight, installation works.
When I try to install same application on OSX 10.7, iTunes10, installation works fine.
Maybe is problem in iTunes artwork that has to be 1024x1024, I do not know.

simulating app upgrade in iOS

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.
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.
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.

Issues when updating iOS app from wildcard to explicit app ID?

We have an app in the store right now that was shipped with a wildcard app ID.
The update that is now pending approval was created with an explicit app ID, to enable push notifications.
We've noticed the following issue during ad hoc testing of the update: if we delete the app-store version from our iPhones, and then install the ad-hoc update, everything is fine. If, however, we leave the app-store version running in the background, and install the ad-hoc update over it, the updated version installs but fails to start up. We suspect that this has to do with the ID change.
If this problem is specific to ad hoc installs, then it is not a worry for us, but we are concerned that existing users will encounter this problem when doing the real upgrade from the app store.
Has anyone seen installation issues after upgrading from a wildcard-ID app to an explicit-ID version?

How to test an iPhone application update?

I already have an iPhone application (version 1.0) available in the App Store and am ready to submit a newer version (version 1.1). How do I test the new upgrade to make sure that the current sqlite database and property list files on the earlier version do not get deleted/overwritten etc? The new version assumes the old data in both the sqlite database and property lists remain.
Or better yet, is there a resource I can use to walk me through what to watch for when developing an application update?
The way we tackled this when we wanted to test our database upgrade code was to use ad hoc distribution.
We had our testers download the 1.0 app from iTunes and install it on their test devices.
Then we built an Ad Hoc distribution of the app using a configuration based on the Release config, and made sure that it had the same bundle identifier. As long as the bundle identifier is the same, the new app should overwrite the previous version.
We asked our testers to install the ad hoc build as they normally would, by dragging it into itunes and then syncing the device to simulate upgrading.
As far as I know, this is identical to the user downloading and installing an upgrade via the app store on the device itself.
As you'd expect, the documents folder should be left intact, leaving your database in place, and your app should be able to run its upgrade code to modify the database in the way you need.
Hope this helps :)
Test like so:
delete app from device.
install v1.0 app (or .ipa file) into iTunes
sync to device, iTunes will install the app
launch app on device, create and save data, etc.
quit app on device
install v1.1 app (or .ipa file) into iTunes; iTunes will ask to confirm replacing older version of the app.
sync to device, iTunes will update the app
launch app on device
test using existing data with new version of the app.

iPhone app doesn't stay installed (icon disappears)

I'm trying to install Zxing on my iphone from source (I know I can get it at the app store, but I want to modify some things in it).
The problem I'm having is that the app won't stay installed on the phone. It will run without a problem, but no icon will appear after I quit the app. I thought it had to do with my manually editing the codesign information in the project.pbxproj but after the developers changed the codesign identity they had left in the checked in version, the problem still persists.
I tried deploying an app I had developed from scratch and that worked fine.
I'm new to this, so any help would be much appreciated. You can download the zxing code from here:
svn checkout http://zxing.googlecode.com/svn/trunk/ zxing-read-only
Have you downloaded a copy from the App Store? I had one app (built from Xcode) that wasn't staying around after a sync and I found it was because iTunes was looking at my application syncing preferences and it wasn't selected to sync (as I had the Xcode build version on there, I didn't want to sync that version). However, it presumably removes the built app because I said I didn't want to sync any version of it.
Checking the checkbox to sync the app in iTunes kept the Xcode built version on there without installing the App Store version.
Hope this helps.
I think the problem had to do with my iPhone firmware. It might be a bug from Apple as I got an email from truphone saying that users were experiencing similar problems. I re-installed firmware, and could install it fine, and sync other apps. As soon as I did a restore from a previous backup, it broke again... what a pain. Case closed.