Re: iOS Calendar Question
Re: iOS Calendar Question
- Subject: Re: iOS Calendar Question
- From: Marcel Weiher <email@hidden>
- Date: Wed, 02 Oct 2013 21:56:36 +0200
On Oct 2, 2013, at 19:44 , Dave <email@hidden> wrote:
> On 1 Oct 2013, at 18:26, Marcel Weiher <email@hidden> wrote:
>>> http://m.gunwharf-quays.com/whats-on/policing-through-ages
>>
>> As far as I can tell, that link delivers an ics file, “event.ics”, which is then opened automatically by the OS [..]
>> Now I don’t remember any sanctioned ways to open a file without user interaction, so this might not actually help you...
>
> So, I could send a pre-made .ics file to Safari?
Well, you can tell Safari to open a URL that points to the .ics:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://m.gunwharf-quays.com/whatson/cal/694/event.ics"]];
This should bring up the “add event” dialog (I haven’t tried it on iOS). Of course, you are probably in Safari at that point. It would be interesting whether you can send that URL to a WebView (or put it in a dummy html in a WebView). AFAIK, you can’t actually send Safari file URLs that point inside your app wrapper, so getting the .ics to Safari might be problematic. I can think of a few approaches:
1. If you can temporarily post the file to an external site, you can send that link. Almost certainly works.
2. You might be able to embed a tiny web-server in your app and have it serve the ics (URL to localhost:<port>)
3. You might be able to embed the ics in a data URL.
4. Apple might give us filesystem access so we don’t have to do crazy stuff. Right :-/
Cheers,
Marcel
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden