Replies: 2 comments 1 reply
-
|
Hi, this is an intersssting question. I will give some context and a request. RFC5545 specifies alarms but they did not specify when an alarm is snoozed or clicked as acknowledged by the user. Thus this varies. You can find my current state of understanding the different implementations in Event.alarms attr. Next: icalencar allows you to create invalid calendar files. If you look at the attributes, DTSTAMP and LAST-MODIFIED are important if I remember correctly. Also, if you read the RFC, there is something about importing alarms. I.e. if I publish an event and want to be notified 10 min before, people importing it not necessarily have to want this. So, what I would suggest:
Request:
|
Beta Was this translation helpful? Give feedback.
-
|
Hello, Thanks very much for the prompt reply. I do have a few questions:
What screen shot did you have in mind?
I have imported the modified version, where I added the alarm manually using calendar on Mac OS and it imported just fine and preserved the alarm.
I modified the exported version by changing the 1hr alarm to a 24 hour alarm and that imported just fine
Which attributes do you mean? There are so many and I am not sure how to generate all of them Finally
Apple certainly supports acknowledging alarms but that doesn't seem to impact the version of the saved event Thanks again, I hope these answers are useful. I am happy to do more if you can suggest things. Kristine |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've just started using icalendar (latest release) on python 3 to generate my calendar for my work shifts on my iPhone. I run the python script on my MacBook Pro.
The issue I am having is with Alarms (which Apple refers to as Alerts). This is the source code of a sample calendar entry generated by my code in icalendar:
BEGIN:VEVENT
SUMMARY:Night shift
DTSTART:20250414T193000
DTEND:20250415T060000
UID:fb8a3d6b-c16a-4329-9224-50cf0aed8f2f
DESCRIPTION:Shift
NAME:Night shift
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:Reminder
PRIORITY:5
TRIGGER:-PT1H
UID:68ba2655-da10-4a9c-9cce-6af53dbb3626
END:VALARM
END:VEVENT
However when I import this into the Calendar app on my mac, the Alarm appears to be parsed out, all except for the "Description" which appears in the event as text in the Note field (instead of the "Shift" description I had provided)
If I export the event entry on my MacBook, the source code I get is this:
BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:-//Apple Inc.//macOS 15.3.2//EN
VERSION:2.0
BEGIN:VEVENT
CREATED:20250325T053918Z
DESCRIPTION:Reminder
DTEND:20250415T060000
DTSTAMP:20250325T053926Z
DTSTART:20250414T193000
LAST-MODIFIED:20250325T053918Z
SEQUENCE:0
SUMMARY:Night shift
TRANSP:OPAQUE
UID:259563A7-BC18-4551-B57F-1151A8E64678
X-APPLE-CREATOR-IDENTITY:com.apple.calendar
X-APPLE-CREATOR-TEAM-IDENTITY:0000000000
END:VEVENT
END:VCALENDAR
So there is no alarm/alert at all.
If I add an alert on the Mac using Calendar, the resulted exported event is:
BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:-//Apple Inc.//macOS 15.3.2//EN
VERSION:2.0
BEGIN:VEVENT
CREATED:20250325T053918Z
DESCRIPTION:Reminder
DTEND:20250415T060000
DTSTAMP:20250325T054316Z
DTSTART:20250414T193000
LAST-MODIFIED:20250325T053918Z
SEQUENCE:0
SUMMARY:Night shift
TRANSP:OPAQUE
UID:259563A7-BC18-4551-B57F-1151A8E64678
X-APPLE-CREATOR-IDENTITY:com.apple.calendar
X-APPLE-CREATOR-TEAM-IDENTITY:0000000000
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:Reminder
TRIGGER:-PT1H
UID:77BC32FB-F7EB-4643-B250-EEC8FF3265CC
X-WR-ALARMUID:77BC32FB-F7EB-4643-B250-EEC8FF3265CC
END:VALARM
END:VEVENT
END:VCALENDAR
I am sure Apple is doing things their own way here and not respecting the specification for ical. However I really am looking for help in generating Events that have alarms on them and the Mac OS / iOS is the environment I have to work in. Can anyone help me with this?
For that it's worth, here's the python code that generated the event and alarm (the variables startdt and enddt are Python datetime instances):
Any help would be very much appreciated.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions