authorizationStatus is a contant of ALAssetsLibrary, it will checks whether the user of application has provided access to the application to access the Assets or not. In case not then it shows up a alert to the end user to enable manually via Settings. One thing to remember there is no way you can change the settings through your app programatically. So this has to be done manually as its upto end user to allow access to Assets for the particular application. Its example is here:
if([ALAssetsLibrary authorizationStatus]) { //Library Access code goes here } else { UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Permission Denied" message:@"Please allow the application to access your photo and videos in settings panel of your device" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles: nil]; [alertView show]; }
Liked By
Write Answer
What is the use of authorizationStatus in ALAssetsLibrary?
Join MindStick Community
You have need login or register for voting of answers or question.
Tarun Kumar
17-Dec-2015authorizationStatus is a contant of ALAssetsLibrary, it will checks whether the user of application has provided access to the application to access the Assets or not. In case not then it shows up a alert to the end user to enable manually via Settings. One thing to remember there is no way you can change the settings through your app programatically. So this has to be done manually as its upto end user to allow access to Assets for the particular application.
Its example is here: