A couple of options:
- If you already have the calendar list and want to convert that item as an iCal refer this link.
- If you want to dynamically create iCal with custom parms you can create .ics file using this plugin. Upon creation save it in a library later attach it.
Calendar item to ics file - link.
Plugin to ics fle - link
var cal = ics(); cal.addEvent(subject, description, location, begin, end); cal.addEvent(subject, description, location, begin, end); // yes, you can have multiple events :-) cal.download(filename);
Note: Refer the original articles for better integration.