Search code examples
iosxcodecore-dataicloud

iCloud Sync does not happen between Live Version of App And Development Version of App (When tested via Diawi, Testflight or ipa copy)


BACKGROUND

  1. I have been using iCloud with Core Data in Packing Planner App. Current version live in the App Store is 2.0.2. It has 14000+ users.

  2. As per the business needs, I had to add 4 new attributes (fields) to the schema in upcoming version (v2.1).

  3. Version of my XCode is: 5.1.1 and iOS Version is: 7.1.1
  4. I have implemented lightweight migration of the schema using automatic mappings

PROBLEM

  1. The end-user is using the app downloaded from the App store and has the iCloud enabled.
  2. The end-user updates to version 2.1 of the application via Diawi, TestFlight or ipa copy/paste, iCloud sync DOES NOT HAPPEN and user is not able to see the iCloud data in his device.
  3. But, if the user updates to version 2.1 of the application via XCode, the iCloud sync happens as expected.
  4. Real world users will update the App via App Store and there is no way to test this scenario except Diawi, ipa copy/paste and Testflight.
  5. How to ensure that users will get iCloud work as expected after the update of version 2.1.

DIFFERENT SCENARIOS TESTED

  1. I tried deleting the 4 new attributes (fields) and then performed "problem step #2." It works well. If I add 4 new attributes again, it stops functioning. The culprit is added attributes for sure.
  2. I tried performing "problem step #2" on iOS 6. It works well as expected without any problem.

Solution

  • I came to know that the iCloud syncing won't work when you try to install development build over distribution build with latest / same version. To get iCloud work type of build must be same. i.e. iCloud sync will only work when you install new development build over old development build / new distribution build over old distribution.