After upgrading to Monterey i can't send image files thru Messages.app using AppleScript. The script below worked before I upgraded to Monterey. I think it's some sort of privileges/sandbox bug and Messages.app can't access and send a file. Any solutions to the problem?

on run
    tell application "Messages"
        set targetService to 1st account whose service type = iMessage
        set targetBuddy to participant "MyPhoneNumber" of targetService
        send POSIX file "/Users/MyUserName/Desktop/example.jpg" to targetBuddy
        #send "hello" to targetBuddy
        #sending text messages works, sending image files no longer works
    end tell
end run
  • Running into same issue – would love suggestions!
    – Suan
    Nov 4 '21 at 23:39
  • 1
    I haven't found a solution to the problem and reported this as a bug to the Apple
    – Gintaras
    Nov 5 '21 at 0:19
  • Thanks @Gintaras. If there's a link to the bug report would you mind posting it? I've also verified that giving the Messages app full disk access doesn't solve it
    – Suan
    Nov 5 '21 at 14:12
  • 1
    The link to the bug report is private, a form filled using "Feedback Assistant" recommended by developer.apple.com/bug-reporting under category: "Incorrect/Unexpected Behavior", "Messages.app", "Sending or receiving"
    – Gintaras
    Nov 5 '21 at 14:43

You must log in to answer this question.

Browse other questions tagged .