I am trying to write a PHP service to make calendars from some data. Anyway, the example it returns (it is static during the test) shows up normally when trying to get it by http://my_domain.com/ics.php or just to download response as an .ics file (location, URL, description, alert fields have been shown properly, I can save it on my device or CalDAV/Cloud server), so the iCS syntax is OK. But when I try to subscribe to it through webcal://my_domain.com/ics.php, its events do not show up on my Calendar timeline (although I can still see it in the "Calendars" sections and even "refresh" it). When refreshing it, the events still can't be seen, but the server notices the request to my_domain.com/ics.php.

I tried:

  • Rebooting the device & server
  • Making a static .ics file and subscribing to it
  • Adding response headers like Content-type: text/calendar and Content-disposition: attachment; filename=index.ics
  • Disabling iCloud & Google Calendars accounts on the device
  • Generating another event in the calendar

And nothing above helped. The subscribition works on Microsoft Outlook, Mozilla Thunderbird on Windows 10 device. On my i-device there was another public subscribed calendar, but it also did not worked. The example of generated ICS can be watched here. What should I change to make it subscribed and shown properly?

I will appreciate any provided help!

Added: now when accessing through webcal:// safari responses that "Can't opent the page because it is invalid"

1 Answer 1


Solved! To make those events to show up, put a UID parameter inside every VEVENT. Example:

UID:41e9d941b4ae063b9b6236fdc6f2479d-20210424T191741:[email protected]
DESCRIPTION:Read The Cather in the Rye
SUMMARY:English language, ENG-9-1

Also UID can be absolutely random line, e. g. ae063b9b6236fd, but it must be unique for every event in your calendar and outside of your calendar. If the client meets two events with same UID's, the last one mentioned in iCal response will be shown. If there is no UID, the event will be ignored during parsing.

Client needs UID to prevent duplicating events and merging events with TODO lists (if supported), etc.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .