Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TestFlight alert while testing update: You already have this app installed

Tags:

I was trying to test update scenario from live App Store app build to RC using TestFlight, but TestFlight gives me alert "You already have this app installed. Do you want to replace..." (see below screenshot). After confirmation, all data from App Store version is gone.

enter image description here

Steps I do:

  1. Install live app from the App Store
  2. Login and do some operations to get data in the app and Keychain
  3. Go to TestFlight iOS app
  4. Tap "Install" button in TestFlight -> alert "You already have this app installed" appears
  5. If I tap choose Install, new build is installed

Result:

  • The app's content including Shared Container (data shared with Extensions) and Keychain are completely wiped when I open the app again

Edit: The alert in TestFlight appears with any app (I have tried multiple different apps from different dev accounts). The actual data deletion happens only for some.

My question:

Is this expected behaviour from TestFlight or is it any issue with my app? I'm not aware of any changes between versions which could cause any issues.

I believe this was not happening before (the last time I tried was few weeks ago).

I couldn't find any documentation or release notes regarding TestFlight app behaviour or changes.

Did anyone experience the same issue? Or do you know any resources describing this behaviour?

Thanks for any answers!

like image 719
Lukas Kukacka Avatar asked Nov 05 '15 08:11

Lukas Kukacka


People also ask

What happens when TestFlight app expired?

After the 30-days-period expired, your test won't be able download or run your app. I didn't find a way to extend this period. You only can upload an updated version to get another 30 days.

How do I get my TestFlight invitation code again?

Next, go to 'Users and Roles' > 'TestFlight Beta Testers' > 'External' and delete users you want to resend invites to. After that add them as new external users to your build. After that new invites will be sent to them.


1 Answers

After long research, trials and errors, creating radar and releasing update to App Store, I have an answer:

Alert is there always and does not have relation to losing data.

  • The alert with warning about possible lose of data is being displayed always for any app being installed from TestFlight over the Non TestFlight Build.
  • This was true for any of multiple apps I have tried.

identifierForVendor changes when overwriting app with TestFlight build.

  • When you have App Store version of the app installed and overwrite it with build from TestFlight, result of [[UIDevice currentDevice] identifierForVendor] changes
  • This is unexpected since it is not mentioned in the documentation (see below)
  • In my case unexpected change of identifierForVendor was causing "loose of data" which wasn't actual lose of data, but it is happening only for TestFlight builds which you cannot debug, so it was hard to find the issue.

Documentation of [[UIDevice currentDevice] identifierForVendor] says:

The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them. The value can also change when installing test builds using Xcode or when installing an app on a device using ad-hoc distribution.

like image 148
Lukas Kukacka Avatar answered Sep 20 '22 17:09

Lukas Kukacka