Saving alarms to an `EKEvent` fails silently (reports success)

Number:rdar://46361237 Date Originated:30/11/2018
Status:Open Resolved:
Product:iOS + EventKit Product Version:iOS 12.1
Classification:Bug Reproducible:Sometimes

EKEventStore is reporting that EKAlarms have been successfully saved to an event, but they are not present in the event afterwards.

Steps to Reproduce:
Get an existing `EKEvent`. Create an `EKAlarm` and set the `alarms` property of the event. Save "successfully" to the `EKEventStore`. Receive the success response, and no error.

Check the event immediately afterwards - no alarm.

I haven't found a pattern regarding types of event or calendar - today, it happened repeatedly on my own device (iPhone X - iOS12.1 16B92) when adding a very standard "10 minute before" EKAlarm to a very standard existing EKEvent in my main iCloud calendar.

This happened a number of times this morning at approx 9am AWST, so hopefully there's something in the logs provided.

A work around is to check the events after saving, then if the alarms are not present, we reset the EKEventStore, reattach the same alarms, and save again. This time they'll save.

This has apparently been happening at least as far back as 2015. Discussion about this is here:

Expected Results:
The alarms property of the event should contain the new alarm.

Actual Results:
The alarms property of the event does not contain the new alarm.

Xcode 10.1 (10B61)
iPhone X - iOS12.1 (16B92)



Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at 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!