iCloud core data ubiquity peer id is changing when a app is updated, It causes user data loss.

Number:rdar://19624135 Date Originated:2015-01-28
Status:Open Resolved:
Product:iOS Product Version:8.1
Classification:iCloud, Core Data Reproducible:Always
Ubiquity Peer ID is changes when install a new version of an App from AppStore or TestFlight.
(even the app id is not changing)

What if the new version of the app contains new version of the core data schema, The automatic migration will not be performed because of different ubiquity peer id. 

(Installing two versions of the app thorough Xcode doesn't changing peer id, and migration is performed as expected)

As a result, User will loss all content of core data that made in older version.

Without core data schema changes, new peer will be synchronized after while.
However, old peer data(that is useless forever) will be remains.

Steps to Reproduce:
1. Create a app that uses iCloud Core Data.
2. Distribute the app through test flight. (This bug is not reproducible when the app is installed or updated through Xcode directly)
3. Install the app through test flight.
4. Make some datas.
5. Create a new version of the app with schema changing that includes automatic light weight migration.
6. Distribute the new version of the app(TestFlight).
7. Install the new version of the App through test flight.
8. Data that is made in step 4 will be loss. because of the peer id is changed, so no local migration is performed.

Expected Results:
The existing Persistent Store should have to be migrated.

As described in:


Actual Results:
The new ubiquity persistent store with new peer id is created with empty data. 

There is no way to access old persistent store(old peer id).

iOS 8.1

Please, Please notify me any changes about this issue.

All iOS devices.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!