I have an app that programmatically adds reminders to your iOS device\'s calendar.
Previous to iOS 5, I could add a calendar item with two alarms thusly:
<
I had the same error.
The problem seems that startDate shoudln't be the same as endDate... really silly iOS change!
If you take a look at the EventKit section in the iOS 5 changes from iOS 4.3 document, it mentions that some items are deprecated for EKEvent. The hierarchy has changed and a new abstract superclass has been added: EKCalendarItem.
have you tried calling addAlarm using a variable?
EKAlarm *alarm = [EKAlarm alarmWithRelativeOffset:60.0f * -5.0f]]; // 5 min
[event addAlarm:alarm];
EKAlarm *alarm2 = [EKAlarm alarmWithRelativeOffset:60.0f * -15.0f]]; // 15 min
[event addAlarm:alarm2];
Its a bug with Apple. If you set 2 alarms it causes the app to freeze. If you only set 1 it works just fine. This is fixed in iOS 5.1 .