我正在尝试直接从我的应用程序打开系统日期和时间首选项。我似乎可以毫无问题地打开系统偏好设置:
let settingsBundleIdentifier = "com.apple.systempreferences"
NSWorkspace.shared.launchApplication(withBundleIdentifier: settingsBundleIdentifier, options: [], additionalEventParamDescriptor: nil, launchIdentifier: nil)
Run Code Online (Sandbox Code Playgroud)
但我不知道如何直接进入日期和时间窗格。
我尝试将捆绑标识符更改为com.apple.systempreferences:com.apple.datetimepref,com.apple.systempreferences:com.apple.preference.datetime但无济于事。
我应该在这里做什么?不能直接通过捆绑标识符打开窗格吗?
我知道我可以使用文件路径直接打开首选项窗格DateTime.prefPane。但我希望使用捆绑标识符打开它。