Adding Contact to Device Contacts app crashing in macOS ventura

We are using CNSaveRequest in CNContactStore to add contacts to system device contacts. But when calling execute method the app crashing in internal libraries.The code was working fine until macOS Monetery, In macOS Ventura beta we are facing this issue.

Sample Code:

        let store = CNContactStore()
        store.requestAccess(for: .contacts, completionHandler: { isSuccess,error in
            guard isSuccess else {
                return
            }
            let contact = CNMutableContact()
            contact.familyName = "Hello"
            contact.givenName = "Contact"
            let request = CNSaveRequest()
            request.add(contact, toContainerWithIdentifier: nil)
                do {
                    try store.execute(request)
                }
                catch {
                    print(error)
                }
         })

Crash:

Replies

I have the same issue. CNSaveRequest no longer working in Mac Catalyst app on Ventura 13.0 (22A380) https://stackoverflow.com/questions/74215842/cnsaverequest-no-longer-working-in-mac-catalyst-app-on-ventura-13-0-22a380 i filed a feedback with Apple after creating a sample project showing the error.

On Mac Ventura the app just crashes at the execute save request -> Error I get is

Thread 1: EXC_BAD_ACCESS (code=1, address=0x49f330ba4290)

I created a simple project showing this error and filed a feedback request with the sample project to apple FB11721907 CNSaveRequest failing on Ventura 13.0 (22A380)

Any help would be appreciated because my Mac Catalyst app is in the App Store and if the user updates to Ventura the app just crashes. Thank you.

I created a simple project showing this error and filed a feedback request with the sample project to apple FB11721907

Thanks for that.

Please re-run your test app, reproduce the crash, and then grab a sysdiagnose log and attach it to your bug report.

For more information about sysdiagnose logs, see Bug Reporting > Profiles and Logs.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I also have the same exact issue, and the app crashes for many of my users when they add new contacts (and are running macOS13). My app is an AppKit app, so this isn't just a Catalyst issue.

I filed FB11724222 for this.

  • Thanks for filing FB11724222.

Add a Comment

Also encountering this; filed FB11727587 with a sample app that reproduces the crash. Has anybody come up with any temporary workarounds for this?

I also have this problem and filed FB11710852 with sample test App, copy and pasted from Apple's documentation. Was filed in Oct 2022 and no response. Also tried same Test App in Swift and get the same result.

A message showing in the Console is: "[api] Attempt to write notes by an unentitled app"

In a semi recent version of iOS, Apple requires a special additional entitlement for App's that want to update the Notes field of a Contact but as far as I know, this is not (yet) required for macOS App's right?

Anyone have any updates?

Add a Comment