Icalendar calendar Subscription

I created an app that will create an icalendar file in ics format using php on my server. I need an option for users of the app to sync or subscribe to this calendar with the built-in calendar app on their phone. I know they can just do it with a few steps on an ios phone but I would like it automated. I know this is done in native apps. I just clicked a button on TeamConnect app to get my kids soccer team schedule on my phone.

Does anyone know of a plugin that can handle this for phoneGap builds?

Thanks in advance.

There are several iCal plugins out there but I’d first look at Eddy Verbruggen’s

https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin/blob/master/README.md

I have played around with this plugin before. No easy function for calendar subscribing. My thinking is it would not be a calendar plugin, more of a settings/password & accounts plugin. The manual actions taken on a ios device would be the following:

  1. Open the “Settings” app on the device.
  2. Scroll to “Accounts & Passwords”.
  3. Under “Accounts”, tap “Add Account”.
  4. Choose “Other” from the options and select “Add Subscribed Calendar”.
  5. Paste or enter the calendar URL being subscribed to and then click “Next”.
  6. Once verified, the device will ask for further information (like “Username” and “Password”), leave these blank.
  7. Toggle the “Turn off SSL” option, you can toggle it on.
  8. Hit “Next” again and then “Save”.
  9. Now in the “Calendar” app the subscribed calendar should appear

Even if you could automate all those steps, it would never make it into the App Store.

I think the best you can do is return the calendar entry details from the server and use those details to create the calendar entry. When the main calendar changes, push a notification out to the app.

As for actually “subscribing” I’ve not faced that challenge. Did you post the question on the plugin’s issues page?

Not sure why Apple will stop it from being put into app store. I know of at least 7 different apps that does the very same function with the click of a button.

I will post it on plugin sites to see what I get back. Thanks again.

Did you see this SO question?

https://stackoverflow.com/questions/7685279/programmatically-add-event-in-iphone-android-calendar-with-phonegap-jquery-mobil/8223704#8223704

I have not seen that stackoverflow before but there in nothing on subscribing to a calendar file that I can find in that discussion.

With the ios subscription to a web calendar file in ics format, when the file is updated, no programming is necessary. If you create an ics file with 10 events and subscribe to the calendar on your phone, the ten events appear on your phone. If you update the file with a new event and delete an old event and update the web file, your phone calendar add events and deletes the old event. NO programming necessary other than creating the new ics file after a change.

Looks like these are native APIs that no plugin has been developed for.

Sometimes the answer is so easy, its hard to see. All I need to do is use the url scheme webcal.

Simply answer:
location.href=“webcal://something.com/somethingcal.ics”

Epic! Great find!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.