App data wipe out after iOS update from 16.6.* to 16.7.2

Our app stores some data to keychain , userdefaults or document directory storage as part of user registration process. This data help in determining the user registration status in subsequent launches and authenticate user.

Recently, 2 of our customer's device got auto updated to 16.7.2. User is unaware of this auto update but next time they launched the app, it asked them to register instead of allowing them login.

As per overall analysis of all aspect, We also suspect that OS update may have wiped out data from one of the storage location which is causing app to determine that user is not registered.

We need to conclude the RCA for our issue and if OS update may be a possibility, will need to release an advisory to all users of possible consequences and workaround.

Request your help to understand the possibility.

This looks like something you should debug yourselves. Have a device on iOS 16.6.x and store the relevant data in the defaults. When the OS is updated to 16.7.2, see if the data is still there. If not, determine why the data isn't there any more. An OS update shouldn't affect data stored in an app's sandbox.

(Also, please don't use random tags for your post. This has nothing to do with App Store, Entitlements and Xcode. By using the wrong tags you're actually making the use of tags absolutely pointless. If I'm searching for posts tagged with Xcode and yours comes up, then it's just noise.)

We also suspect that OS update may have wiped out data from one of the storage location which is causing app to determine that user is not registered.

That seems unlikely. iOS is generally very good about preserving application data across updates. My experience is that the vast majority of these problem are caused by the code in the app itself. That is, the app finds itself running in a new environment, which causes something to go wrong, which causes it to run a recovery code path, which logs the user out.

Unfortunately it’s hard to test this. My best suggestion is:

  1. Get two devices, one with the old OS and one with the new.

  2. Run your app on the device with the old OS, log in, and create some data.

  3. Using Xcode, download the app’s container from that device.

  4. Run your app on the new device.

  5. Stop it.

  6. Using Xcode, upload the container from step 3 to the new device.

  7. Run your app again.

While this isn’t exactly the same as what you get during an OS upgrade, it’s pretty close.

You can automate steps 6 and 7 by setting the Product > Scheme > Edit Scheme > Run action > Options tab > App Data popup.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

App data wipe out after iOS update from 16.6.* to 16.7.2
 
 
Q