We’ve been attempting to reliably update contacts in iCloud and Gmail containers. Having tried several approaches (bulk writes, batched writes, one-by-one writes with sleeps in between, etc.), we’ve found flakiness in all approaches that is never exposed to the app.
Diving a little deeper, we’ve found that this appears to be due to internal server-client failures between iOS and the relevant CardDAV servers.
From our analysis, we seem to be seeing 2 key types of failure:
When the client-server interaction is interrupted, contact update requests appear to be discarded and not resumed for whichever container was currently in progress.
After a variable period of time, the server wipes the newer client state and reverts to an older, stale state.
We’re trying to understand if there is something we are doing wrong with our writes or if this is an iOS level bug.
This is easily reproducible for any device connected to an iCloud or Gmail account with circa. 100+ contacts:
for each container
for each contact in container
create CNSaveRequest
update any field in contact and add to save request
execute save request
Post
Replies
Boosts
Views
Activity
We are trying to query our perf and metrics data through the ASC API, and are finding that it returns empty JSONs.
Looking in xCode's Organizer we see the same result, with the addition of an 'Insufficient Metrics Data' label.
The apps in question are live with a couple thousand users, I was wondering if we could get any information on what scale needs to be reached in order to extract this metrics data?