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?
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:
Open the “Settings” app on the device.
Scroll to “Accounts & Passwords”.
Under “Accounts”, tap “Add Account”.
Choose “Other” from the options and select “Add Subscribed Calendar”.
Paste or enter the calendar URL being subscribed to and then click “Next”.
Once verified, the device will ask for further information (like “Username” and “Password”), leave these blank.
Toggle the “Turn off SSL” option, you can toggle it on.
Hit “Next” again and then “Save”.
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.
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.