In my iPhone application, I have this button that opens the webcal: // URL in a UIWebView as follows:
#define kHostName @"webcal://www.markthisdate.com/kalender/World_Cup_Football_2010_Match_Schedule_10251.ics"
- (IBAction)putInCalendar:(id)sender{
NSURL *url = NULL;
url = [[NSURL alloc] initWithString:kHostName];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL: url];
[webView loadRequest: request];
[request release];
[url release];
}
In iOS 3.x, this triggers the sequence of the “Subscribe to Calendar ...” dialogs, etc., similar to what happens if you open the same URL in Mobile Safari: the associated event is added as a subscription to the iPhone calendar.
Somehow, in iOS 4.0, this does not work from my application, although opening a URL in Mobile Safari in iOS 4.0 works.
Can someone explain to me why this does not work, but even better: what would be the appropriate approach of iOS 4.x to this feature.
, 4.0, , , ; Event Kit , - Event Kit.