As I understand it, the idea here is to:
- Have 1 SQL store for both local and cloud persistence
- Depending on what the user selects (cloud enabled or not), the store is opened with ubiquity enabled or not.
- When the store is modified while ubiquity is disabled, opening the store later with ubiquity enabled causes problems.
- When the store is modified while ubiquity is enabled but disabled on another device, opening the other device's store later with ubiquity enabled causes problems.
- To address these problems, sentinels are used that cause the cloud data to get reset to the store data whenever the app enables ubiquity and its store had previously been enabled for ubiquity.
Wouldn't it be possible to get rid of the whole problem by using 2 SQL stores instead of 1? Always open SQL store A when the user chooses to disable ubiquity and store B when the user enables it. That way, iCloud enabled/disabled would trigger the app to switch between different data sets, but you wouldn't need sentinels. Is this a correct assumption? Are there advantages to the sentinel approach?
As I understand it, the idea here is to:
Wouldn't it be possible to get rid of the whole problem by using 2 SQL stores instead of 1? Always open SQL store A when the user chooses to disable ubiquity and store B when the user enables it. That way, iCloud enabled/disabled would trigger the app to switch between different data sets, but you wouldn't need sentinels. Is this a correct assumption? Are there advantages to the sentinel approach?