Skip to content

Commit

Permalink
Merge pull request #50 from ajevans99/update-bundle-id
Browse files Browse the repository at this point in the history
Fix Messages Bundle Identifier for latest versions of macOS (11.0+)
  • Loading branch information
ZekeSnider committed Jul 26, 2021
2 parents 3371aa8 + 00639c4 commit 4d241b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Jared/PermissionsHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ class PermissionsHelper {
}

static func canSendMessages(shouldPrompt: Bool = false) -> AutomationPermissionState {
let target = NSAppleEventDescriptor(bundleIdentifier: "com.apple.iChat")
let target: NSAppleEventDescriptor
if #available(OSX 11.0, *) {
target = NSAppleEventDescriptor(bundleIdentifier: "com.apple.MobileSMS")
} else {
target = NSAppleEventDescriptor(bundleIdentifier: "com.apple.iChat")
}
if #available(OSX 10.14, *) {
let permission = AEDeterminePermissionToAutomateTarget(target.aeDesc, typeWildCard, typeWildCard, shouldPrompt)
var permissionEnum: AutomationPermissionState
Expand Down

0 comments on commit 4d241b9

Please sign in to comment.