com.apple.iTunes AEDeterminePermissionToAutomateTarget is always return -600

后端 未结 1 1767
孤独总比滥情好
孤独总比滥情好 2021-02-15 16:14
import ScriptingBridge

class iTunesAccess {
    static func requestAccess() -> Bool {
        guard #available(OSX 10.14, *) else {
            return true
        }         


        
1条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-15 16:26

    Good call on the NSAppleEventsUsageDescription key — that’s required if you link against the 10.14 SDK — but if your app is sandboxed, you’ll also need an appropriate Apple event entitlement: com.apple.security.scripting-targets if you can, or com.apple.security.temporary-exception.apple-events if you must. See https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/AppSandboxTemporaryExceptionEntitlements.html for more details, including a way to specify both entitlements, but only one applies depending on the current OS version.

    0 讨论(0)
提交回复
热议问题