Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloudkit issue with private database and subscription?

Problem

Bob's iPhone saves recordA in someZone in Bob's private database.

Bob's iPad receives subscription notification of changes and retreives recordA from someZone in user's private database.

Bob's iPod touch also receives subscription notification of changes and retrieves recordA from someZone in user's private database.

Bob's iPad deletes recordA in someZone in user's private database.

Bob's iPod touch and iPad (for some reason) receives a subscription notification of deletion. Bob's iPhone does not receive subscription notification.

Expected Results

Bob's iPad should not receive subscription notification of deletion. Only Bob's iPhone and iPod touch should receive subscription notfication.

This is stated in CKSubscription's documentation:

When a record modification causes a subscription to fire, the server sends push notifications to all devices with that subscription except for the one that made the original change to the record.

The iPad made the deletion, therefore, the iPad should not be receiving the subscription notification.

Actual Results

The iPad receives the subscription notification of deletion, despite being the author of the original change to the record.

The iPhone does not receive the notification of deletion.

The iPod touch receives subscription notification of deletion.

Additional Feedback

It looks like the original author of the record (not the original author of the change) does not receive any notifications, no matter who deleted the record. This is inconsistent with the documentation.

like image 288
ninjaneer Avatar asked Dec 06 '14 11:12

ninjaneer


1 Answers

This is a known CloudKit bug. There is however a workaround for this. When you first touch the record by making a small change and then remove the record, then it works as described.

like image 110
Edwin Vermeer Avatar answered Sep 30 '22 06:09

Edwin Vermeer