O$ 10.22 AppleScript Error (Not authorized to send Apple events to Calendar.)
Mike Matthews - Omnis
omnis at lineal.co.uk
Tue Nov 15 11:49:17 UTC 2022
Hello All,
Some success on this point at last. I used option 1 for a while, and the UK support came up with this fix, shown in item 2.
1 I used a TCC.db file from another user. Works, but not a fix.
2 Add two lines to the info.plist file inside the Omnis Tree. See below response:
On later versions of macOS there will be no prompt to allow access to the Calendar unless the following entry is added to the apps Info.plist file,
<key>NSCalendarsUsageDescription</key>
<string>Please provide access</string>
Without the prompt an entry is not added to the Calendar’s privacy settings which would allow Studio access.
The Info.plist file is located at,
/Applications/Omnis Studio 10.22 31840.app/Contents/Info.plist<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2f31840.app%2fContents%2fInfo.plist&c=E,1,okK1XEp_hsnvH-j1WLvDVW1SrMMhQAEm2yVJc6ZUFHi5liqxprhBTDBB5gMXH2iymLz6xCEKGmIxUN8B56VDGAuiftDzrPb--qnfto5oqwj2d27l&typo=1>
If this file is altered then the tree will need to be signed again.
Mike Matthews
Lineal Software Solutions
Commercial House, The Strand<x-apple-data-detectors://1/1> Barnstaple, Devon, EX31 1EU<x-apple-data-detectors://1/1>
omnis at lineal.co.uk<mailto:mike.matthews at lineal.co.uk>
www.lineal.co.uk<http://www.lineal.co.uk/>
www.sqlworks.co.uk<http://www.sqlworks.co/>
On 9 Nov 2022, at 18:38, Mike Matthews - Omnis via omnisdev-en <omnisdev-en at lists.omnis-dev.com<mailto:omnisdev-en at lists.omnis-dev.com>> wrote:
Hello All,
An odd problem has arisen with new Macs and Monterey. Just missed it until now really. When I run and AppleScript to fetch events from iCal, I get a warning 'Not authorized to send Apple events to Calendar.’ I can launch iCal/Calendar however, but not control it.
This is the reported error text:
'Not authorized to send Apple events to Calendar.'
On my older Mac that is still using Intel chip and OSX 10.15, all is fine, but on newer M1, Monterey, I can’t seem to get the security setup right.
I have reset using 'tccutil reset AppleEvents’ so I get the prompt to allow security to be allowed, but the setting is not made. Looking at the Calendars in Security & Privacy pane, no apps are shown.
Is this just me, or are others failing as well?
Begin text block
Text:tell application "iCal"(Carriage return)
Text:launch(Carriage return)
Text:end tell(Carriage return)
End text block
Get text block lvScript
Do $runapplescript(lvScript,lvResult,lvApplescriptError) Returns lvErrCode
If len(lvApplescriptError)
OK message {Encountered Error: [lvApplescriptError]}
Calculate lvFlagOK as kFalse
End If
If lvFlagOK
Begin text block
Text:tell application "iCal"(Carriage return)
Text:set theCalendarNames to name of every calendar(Carriage return)
Text:end tell(Carriage return)
End text block
Get text block lvScript
Do $runapplescript(lvScript,lvResult,lvApplescriptError) Returns lvErrCode
End If
Thanks
Mike Matthews
Lineal Software Solutions
Commercial House, The Strand<x-apple-data-detectors://1/1> Barnstaple, Devon, EX31 1EU<x-apple-data-detectors://1/1>
omnis at lineal.co.uk<mailto:omnis at lineal.co.uk><mailto:mike.matthews at lineal.co.uk>
www.lineal.co.uk<http://www.lineal.co.uk><http://www.lineal.co.uk/>
www.sqlworks.co.uk<http://www.sqlworks.co.uk><http://www.sqlworks.co/>
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list