Reputation: 3601
Is there a standard UIView/controller/dialog provided in iOS SDK for informing the user the app does not have access to X resource and this can be fixed from iOS privacy settings.
I have noticed a consistent view seen in many apps (snapshot below is taken from Viber). I could not find any API that would give me this dialog. I suppose I can just create one but still wanted to double check?
For the particular case I have I want to alert the user if app does not have access to user calendar/ reminders.
(I have a BOOL result in my code that tells me access granted true/false -I have to next alert the user with appropriate UI.)
Upvotes: 1
Views: 238
Reputation: 5431
This interface can appear for the calendar if you use EKEventEditViewController
.
Upvotes: 0
Reputation: 385950
The public API's UIImagePickerController
displays that view if the app doesn't have access to the user's photo library. It's a _UIAccessDeniedView
, which is a private class.
As far as I know, the public API doesn't provide an event picker controller, so there's no way to make the system display a similar “standard” view for calendars/reminders in your app.
If you want to set up a similar view yourself, you can extract the lock image using the iOS Artwork Extractor; it's named “UIAccessDeniedViewLock.png”. Warning: copyright infringement. Will Apple care? I have no idea.
Upvotes: 1