On macOS Open system settings > Security & Privacy > Calendar - Follow-up: 814223720

Hi,

I have a Mac app that uses calendar. When the user has not granted access and still wants to access the calendar I would like to open System Settings Privacy and Security pane for calendar on the mac. How can I do this?

  1. Is it ok to open system settings this way?
  2. Or is there a better way?
  3. I would like to publish this app to the AppStore so want to know if this is ok?
if let urlString = URL(string: "x-apple.systempreferences:com.apple.preference.security?Privacy_Calendars") {
    NSWorkspace.shared.open(urlString)
    
}
Answered by DTS Engineer in 737216022

You can find my advice on this topic on this thread. It’s written for iOS but the same basic rules apply on all our platforms.

Share and Enjoy

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

Much information here (for iOS, but should apply with some adaptations to MacOS).

https://stackoverflow.com/questions/28152526/how-do-i-open-phone-settings-when-a-button-is-clicked

Accepted Answer

You can find my advice on this topic on this thread. It’s written for iOS but the same basic rules apply on all our platforms.

Share and Enjoy

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

On macOS Open system settings > Security & Privacy > Calendar - Follow-up: 814223720
 
 
Q