EKAlarm.init(absoluteDate date: Date) doesn't work with Exchange

Number:rdar://FB9230529 Date Originated:
Status:In progress Resolved:
Product:EvenKit Product Version:
Classification: Reproducible:
- Get Microsoft Exchange account
- Set the Exchange calendar as default calendar in iOS Calendar settings
- Run the code

    let eventStore = EKEventStore()
    let event = EKEvent.init(eventStore: eventStore)
    let today = Date.init()
    event.calendar = eventStore.defaultCalendarForNewEvents
    event.startDate = today
    event.endDate = today.addingTimeInterval(3600)
    event.title = "TestEvent"
    event.alarms = [EKAlarm(absoluteDate: Date(timeInterval: -3600, since: today))]
    try eventStore.save(event, span: .thisEvent)
- Open the Calendar App

- Event is in calendar and has alarm 1 hour before event

- Event is in devices Calendar, but doesn't have alarm
- Also synching event to remote Exchange calendar gets "broken", the initial event is synchronized
  to remote Exchange calendar (without Alarm), but further updates (e.g changing startDate) to event 
  are not propagated.
- Works with Yahoo/iCloud calendars
- Fix: event.alarms = [EKAlarm(relativeOffset: -3600)]


my reply

Thanks, where are the specs for Exchange and absolute date alarms not being supported? Would be nice if it was part of API docs of EKAlarm.

1.IOS 14.6 and free Outlook account (https://outlook.live.com/owa/). I'm unable to check Exchange version in OWA. This issue was first reported half a year ago. So, it's unlikely related to latest IOS and Exchange versions. 2.Changing in code. The absolute date alarm is not present in event (new or existing). Pls check attached CalendarTester.zip for actual code. 3.Pls find sysdiagnose attached.

From Apple

Thanks for contacting us. We need additional information.

Our understanding is that Exchange does not support absolute date alarms; it only supports relative alarms. The behavior you are observing when you create the event is expected.

We would like more information about the subsequent syncing failures that you are observing: 1. What versions of Exchange and iOS are you observing this on? 2. How, exactly, are you attempting to further update the event? Are you changing it in the Calendar app, or are you changing it in your code? If you are changing it in your code, is the absolute date alarm still present on your version of the event? 3. Could you please provide us with logs from when the syncing fails? Please provide a sysdiagnose.

Please update your feedback report to provide the additional information. Thank you.

Directions for all sysdiagnose logging, screen recording and profiles: https://developer.apple.com/bug-reporting/profiles-and-logs/

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!