Can a Mac App Store app use an Apple Events temporary exception for Notes?

Hi all,

I’m building a sandboxed macOS app that, among other things, lets the user create and associate an Apple Note with a calendar meeting.

The user explicitly initiates the action. The app uses AppleScript to create the note, obtain its identifier, and open it in Notes.

Notes only declares the com.apple.Notes.openlocation scripting access group. Note creation is not covered, so com.apple.security.scripting-targets does not appear sufficient. The working implementation requires: com.apple.security.automation.apple-events com.apple.security.temporary-exception.apple-events for com.apple.Notes NSAppleEventsUsageDescription

Has anyone successfully shipped a Mac App Store app using this temporary exception to control the built-in Notes app?

Is this potentially acceptable with a clear entitlement explanation and Feedback Assistant report, or should I assume that note creation through AppleScript cannot be included in a Mac App Store build?

Is there another supported API that can create an Apple Note and return an identifier or openable URL for it?

Answered by DTS Engineer in 900534022

Thanks for the post.

It is not permitted to utilize a temporary exception to circumvent the sandbox restrictions for applications. Regrettably, there is no direct, publicly accessible API that enables a sandboxed application to create a system Note.

There are AppIntents for Notes to support system experiences in case you want to use something like that.. https://developer.apple.com/documentation/appintents/adopting-app-intents-to-support-system-experiences

But isn’t to ready the system notes is to create you own notes that follow the correct schema. https://developer.apple.com/documentation/appintents/appschema/notesintent/createnote

Otherwise if that does not work for you I would suggest to file an enhancement request.

If you'd like us to consider adding the necessary functionality, please file an enhancement request using Feedback Assistant. Once you file the request, please post the FB number here.

If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?

Albert  WWDR

Accepted Answer

Thanks for the post.

It is not permitted to utilize a temporary exception to circumvent the sandbox restrictions for applications. Regrettably, there is no direct, publicly accessible API that enables a sandboxed application to create a system Note.

There are AppIntents for Notes to support system experiences in case you want to use something like that.. https://developer.apple.com/documentation/appintents/adopting-app-intents-to-support-system-experiences

But isn’t to ready the system notes is to create you own notes that follow the correct schema. https://developer.apple.com/documentation/appintents/appschema/notesintent/createnote

Otherwise if that does not work for you I would suggest to file an enhancement request.

If you'd like us to consider adding the necessary functionality, please file an enhancement request using Feedback Assistant. Once you file the request, please post the FB number here.

If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?

Albert  WWDR

Thanks very much for this response.

We're going to remove the feature, and allow notes linking only through deepllinks (or apps like hookmark). Users will be able to create markdown documents in our own iCloud Documents container or in a selected folder.

I would love to request public, sandbox-compatible and user-authorized API that can: a) Create a note in Apple Notes with a title and body b) Return a stable identifier or deep link so the originating app can reopen and remain associated with the created note.

@brioche Thanks for your reply, if you would like to create a note in the Notes app, I would suggest to file an enhancement request as detailed as possible for the team to review.

Thanks

Albert  WWDR

Can a Mac App Store app use an Apple Events temporary exception for Notes?
 
 
Q