Amol
Amol

Reputation: 85

Application data lost after upgrade iOS 7 to iOS 8

Lets say- My application ABC

Application users are facing problem with application while upgrading iOS 7 to iOS 8.

Please check below scenario:

  1. iPhone 5s - iOS 7 - users installed my application (This app supports to iOS 7 not iOS 8).
  2. Users downloaded video files in document directory up to size may be 2 GB.
  3. Application working fine with iOS 7.
  4. When iOS 8 released by apple - users were upgraded devices iOS 7 to iOS 8 with above installed application.
  5. All downloaded videos lost which was saved in document dictionary but it still shows space consumed in device setting.
  6. If users download again same video then it works fine but it shows double consumed memory in device settings.

Would you please give me suggestion for above problem then I can suggest to my application users?

Upvotes: 2

Views: 365

Answers (1)

Johannes Rudolph
Johannes Rudolph

Reputation: 35721

We're having a similar issue - and it only surfaced now that we submitted an Update to Apple (our App crashes on launch on iOS 8.1 due to this change!!! Even though our App has deployment target of 7.0 we're affected, talk about backwards compatibility...).

Apple officially outlines what changed in this technical note: https://developer.apple.com/library/ios/technotes/tn2406/_index.html

iOS 8 changes the locations of the standard directories used for storing user and app data (e.g. Documents, Library). While the locations of these directories have always been an implementation detail, some applications improperly assume that the Documents and Library directories reside in the same directory as the application's bundle. iOS 8 splits the data of an application from the application bundle. Code which attempts to derive the path to the Documents or Library directories will return an invalid path on iOS 8. Attempting to access this path will fail, and may terminate your app.

If I understand correctly, even though you were using a proper method to locate the Documents directory on both iOS 7 and iOS 8, you will simply get two different paths. That means users who upgraded from iOS 7 to iOS 8 still have their data under the old Documents path, which resides in your App's bundle. I have no idea as to how Apple thinks we should upgrade our Apps or if there's some automatic copying going on.

I'll have to take a look with a tool like iFunBox (an iOS file explorer) to see what happens.

Upvotes: 1

Related Questions