Contacts framework logs CoreData warnings

Originator:keithbsmiley
Number:rdar://30362625 Date Originated:04-Feb-2017 00:24
Status:Resolved Resolved:macOS High Sierra, 10.13.2 (17C88) at the latest
Product:macOS + SDK Product Version:10.12 SDK
Classification:Other Bug Reproducible:Always
 
Summary:
When using the Contacts framework on macOS, there are warning logs about CoreData dynamic accessors.

Steps to Reproduce:
Run this swift script on macOS 10.12:

```
import Contacts

let store = CNContactStore()
store.requestAccess(for: .contacts) { success, error in
    do {
        let request = CNContactFetchRequest(keysToFetch: [])
        try store.enumerateContacts(with: request) { _ in }
    } catch {}
}

dispatchMain()
```

With: `swift -target x86_64-macosx10.11 script.swift`

Expected Results:
No warning logs are printed

Actual Results:
You get multiple logs like this:

```
CoreData: warning: dynamic accessors failed to find @property implementation for 'uniqueId' for entity ABCDAddressBookSource while resolving selector 'uniqueId' on class 'ABCDAddressBookSource'.  Did you remember to declare it @dynamic or @synthesized in the @implementation ?
```

Version:
10.12 SDK

Notes:
You also see these logs with the older AddressBook framework on macOS as well. This log was not present on 10.11.

See https://github.com/keith/contacts-cli for another case of the log.

Comments


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!