tell application "Contacts"
set allPeople to every person
end tell
When my program reaches this part of the code, it crashes with the error "Contacts got an error: Application isn't running (-600)." It's definitely running. I have the Contacts box checked in the App Sandbox menu of Xcode, and I granted permission for my app to access Contacts when I was prompted. If I turn off the sandbox, the program works without issue.
I've also tried running tccutil reset AddressBook
in Terminal to reset privacy preferences for Contacts, but I still have the same issue.