Hi everyone,
I’m trying to get a list of all available calendars in my calendar application. macos 10.11.
I updated an old realbasic app named “ical test” , basically making a toolbar again as it did not survive the opening process of xojo 2019r11…
it is working, I launch it and it asks me if I allow the app to connect to the calendar app, but the returned list is empty.
the applescript used, below, works fine if I paste it in the script editor and run it.
on run
tell application "Calendar"
set ListOfCalendars to "" as string
set i to 1
set noOfCal to number of calendars
repeat until i = noOfCal + 1
set myCal to calendar i
set ListOfCalendars to ListOfCalendars & {title of myCal} & (ASCII character 9) & {uid of myCal} & (ASCII character 13)
set i to i + 1
end repeat
return ListOfCalendars
end tell
end run
later, I added an info.plist file (below) but it doesn’t change anything, the returned list is empty.
[code]<?xml version="1.0" encoding="UTF-8"?>
NSCalendarsUsageDescription $(PRODUCT_NAME) user your calendar. NSAppleEventsUsageDescription $(PRODUCT_NAME) uses Applescript for its own purposes. [/code]what did I miss ?
thanks.