iOS 13 crash creating reminders

I'm seeing a crash when I attempt to create a new reminder. The crash is in Beta 5 of Xcode 11 / iOS 13. I'm not doing anything special to create a reminder:


let store = EKEventStore()

EKReminder(eventStore: store)


But the crash occurs inside the initializer of EKReminder. Here's what the stack trace looks like:


2019-08-03 15:15:05.836342-0500 Grocery[9785:270848] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<EKPersistentReminder 0x60000289bf00> valueForUndefinedKey:]: this class is not key value coding-compliant for the key dueDateComponents.'

*** First throw call stack:

(

0 CoreFoundation 0x00007fff23b60e3e __exceptionPreprocess + 350

1 libobjc.A.dylib 0x00007fff502f3b20 objc_exception_throw + 48

2 CoreFoundation 0x00007fff23b60a09 -[NSException raise] + 9

3 Foundation 0x00007fff25639f38 -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 225

4 Foundation 0x00007fff25638bab -[NSObject(NSKeyValueCoding) valueForKey:] + 317

5 EventKit 0x00007fff25245d4e -[EKChangeSet valueForSingleValueKey:basedOn:and:] + 305

6 EventKit 0x00007fff25283553 -[EKObject(Shared) singleChangedValueForKey:] + 246

7 EventKit 0x00007fff2521ace5 -[EKReminder(Shared) timeZone] + 23

8 EventKit 0x00007fff2521aab9 -[EKReminder(Shared) setTimeZone:] + 48

9 EventKit 0x00007fff2524b541 -[EKReminder initWithPersistentObject:] + 164

10 EventKit 0x00007fff2524b448 +[EKReminder reminderWithEventStore:] + 194

11 Grocery 0x0000000106eb93c7 $sSo10EKReminderC10eventStoreABSo07EKEventC0C_tcfCTO + 39

12 Grocery 0x0000000106eb9387 $s7Grocery12EventStorageC11newReminder4withSo10EKReminderCSo12EKEventStoreC_tFZ + 711

Replies

I have this same issue. When creating an EKReminder in iOS 13, the app terminates due to uncaught NSException 'NSUnknownKeyException'. The debugger lists the reason as '[<EKPersistentReminder 0x282f39b00> valueForUndefinedKey:]: this class is not key value coding-compliant for the key dueDateComponents.'


I am running the GM seed of Xcode 11.

is there any method to fix this bug

I have the exact same issue. Did you find out what is the root of the problem so we can at least bypass it? Really frustraiting..

I have the same issue. is there any solution ?

This is usually the result of a storyboard outlet connected to a class property that is no longer there. That is, you might have removed/renamed a property in code that was still connected to an outlet. This is not handled automatically by Xcode, if you remove a connected property in code, you also have to remove that connection in storyboard.

To check for this, switch to storyboard and bring up the utilities column (upper right). Select the element and the connections inspector (top right of the utilities column). Check if there are any unwanted connections and remove them if necessary.