On 1 Oct 2013, at 14:23, Mike Abdullah <mabdul...@karelia.com> wrote:

> 
> On 1 Oct 2013, at 14:09, Dave <d...@looktowindward.com> wrote:
> 
>> 
>> On 1 Oct 2013, at 12:16, Mike Abdullah <mabdul...@karelia.com> wrote:
>> 
>>> 
>>> On 1 Oct 2013, at 12:02, Dave <d...@looktowindward.com> wrote:
>>> 
>>>> Hi All,
>>>> 
>>>> This had reared it's ugly head again! I have been asked to add an event to 
>>>> the Calendar WITHOUT asking the user for permission as the Standard 
>>>> Manner. I basically said it couldn't be done based on feedback from here. 
>>>> However, I've was today shown this (See link below) and asked "if they can 
>>>> do it, why can't you?". 
>>>> 
>>>> http://m.gunwharf-quays.com/whats-on/policing-through-ages
>>>> 
>>>> If you open the above link on an iPhone and then click the Add to Calendar 
>>>> button, you will that it appears to add an event to the calendar WITHOUT 
>>>> asking the user for permission! How does it manage to do it? I thought 
>>>> that the OS would intercept any Calendar access calls and show the Alert 
>>>> Box and ask the user for permission to access the Calendar, but this 
>>>> doesn't seem to be the case here. Is this because it's being run in 
>>>> Safari? Can I get the same behaviour from an iOS Native App?
>>> 
>>> I believe the important part here is that the user *has* to explicitly say 
>>> they want to add the event.
>> 
>> Yes, but that's only the way that web site works, it could add it without 
>> any user interaction.
> 
> No, the web site/app *has* to let Safari do the actual adding. All the event 
> UI is provided by Safari. There's no way for it to add the event without any 
> user interaction.

ahhhh, yes, that makes sense.

> 
>> Also, in my native app I'd put up something similar, so what's the 
>> difference? You can let a web site do it, but a native app? Seems to me that 
>> there is way more scope for badness in a web app than in a App that has been 
>> downloaded from the App Store, apart from anything else, you can erase the 
>> app if you want to!
> 
> The web app is completely sandboxed by Safari to only allow this one specific 
> interaction. Regular apps have a slightly different sandbox which operates on 
> a broad policy of "access to the whole calendar, yes or no?"
> 
> Apple could offer a UI using XPC such that only it is privileged to write to 
> the calendar, using the same workflow as Safari (and leaving your app itself 
> without access to the calendar). But it appears that's not the case at 
> present; feel free to file a radar requesting it!

Thanks
Dave


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to