iCalendar: Recurring events are not correctly displayed in IOS

1.2k views Asked by At

Brief introduction

Recurring events in my PHP-generated iCalendar file does not recur correctly with IOS applications. They do recur correctly in Outlook 2010 and Google Calendar, but not in IOS 8.1 (iPhone 5S and iPad 2).

Details

The following file generates a calendar file fit for subscription from applications like MS Outlook and Google Calendar. The file contains a VTIMEZONE and a single VEVENT, meant to recur every friday from 7 - 28. nov 2014, four recurrences in total.

iCalendar file: http://www.elitesystemer.no/mycal_stack_example.php (full code below)

On both my iDevices (IOS 8.1) this event occurs only once; 7. nov 2014. This odd behaviour goes for the native calendar app as well as the Week Calendar app (site: http://weekcal.com).

The file works perfectly with MS Outlook 2010 and Google Calendar, but not with IOS. Unfortunately, I have not been able to find any equivalent issue at the Apple forums. Neither am I able to test with an iDevice with a former OS version, nor with another smart phone at the time.

I have tested the file at online iCalendar validators like http://icalvalid.cloudapp.net/ and http://severinghaus.org/projects/icv/ - perfect results without warnings / errors.

Calendar code generated from PHP

<?php
//set correct content-type-header
header('Content-type: text/calendar; charset=utf-8');
header('Content-Disposition: inline; filename=mycal_stack_example.ics');
?>
BEGIN:VCALENDAR<?echo "\r\n";?>
VERSION:2.0<?echo "\r\n";?>
METHOD:PUBLISH<?echo "\r\n";?>
CALSCALE:GREGORIAN<?echo "\r\n";?>
PRODID:-//Elite Systemer//Ver 1.6//NO<?echo "\r\n";?>
BEGIN:VTIMEZONE<?echo "\r\n";?>
TZID:Europe/Oslo<?echo "\r\n";?>
BEGIN:DAYLIGHT<?echo "\r\n";?>
DTSTART:19810329T020000<?echo "\r\n";?>
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU<?echo "\r\n";?>
TZNAME:CEST<?echo "\r\n";?>
TZOFFSETFROM:+0100<?echo "\r\n";?>
TZOFFSETTO:+0200<?echo "\r\n";?>
END:DAYLIGHT<?echo "\r\n";?>
BEGIN:STANDARD<?echo "\r\n";?>
DTSTART:19961027T030000<?echo "\r\n";?>
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU<?echo "\r\n";?>
TZNAME:CET<?echo "\r\n";?>
TZOFFSETFROM:+0200<?echo "\r\n";?>
TZOFFSETTO:+0100<?echo "\r\n";?>
END:STANDARD<?echo "\r\n";?>
END:VTIMEZONE<?echo "\r\n";?>
BEGIN:VEVENT<?echo "\r\n";?>
UID:[email protected]<?echo "\r\n";?>
DTSTART;TZID=Europe/Oslo:20141107T140000<?echo "\r\n";?>
DURATION:PT60M<?echo "\r\n";?>
RRULE:WKST=MO;FREQ=WEEKLY;INTERVAL=1;BYDAY=FR;UNTIL=20141128T150000<?echo "\r\n";?>
SUMMARY;LANGUAGE=no:Friday<?echo "\r\n";?>
DESCRIPTION;LANGUAGE=no:Oppgave: Friday\n<?echo "\r\n";?>
LOCATION;LANGUAGE=no:Timenesveien 33<?echo "\r\n";?>
BEGIN:VALARM<?echo "\r\n";?>
TRIGGER:-PT15M<?echo "\r\n";?>
ACTION:DISPLAY<?echo "\r\n";?>
DESCRIPTION:Reminder<?echo "\r\n";?>
END:VALARM<?echo "\r\n";?>
END:VEVENT<?echo "\r\n";?>
END:VCALENDAR
2

There are 2 answers

1
Gjermund B. Dahl On BEST ANSWER

After further testing it seems to work if I remove the WKST rule.

WKST=MO

After all, the default value of WKST is MO.

3
anmari On

Mindblowing but it seems that ios simply does not do recurring events by day of week - a quick google found this Jan 2014 post:

The ability to schedule recurring events by day of the week is missing in action on iOS.

http://www.macworld.com/article/2091041/scheduling-recurring-events-on-ios.html the link has some suggestions around it. (and I love the final paragraph suggestion!)

I use google calendar on my iphone so I haven't noticed this before and find it hard to believe, but clearly it is a problem.

The only other way around it that I can think of is to offer an ics feed for apple calendar users that generates RDATE's for the recurring instances, rather than the RRULE. Surely it should load those?