0

Possible Duplicate:
Ask permission to access Camera Roll

I am creating a app compatible with iOS5 in xcode 4.3.2. When i access photos, It is not showing permission alert also when i am running this app in iOS 6.0 devices. Can any one help me how to show permission alert for iOS6 devices. Thanks in advance.

Community
  • 1
  • 1
shivam
  • 1,148
  • 1
  • 12
  • 28
  • check similar question: http://stackoverflow.com/questions/13572220/ask-permission-to-access-camera-roll – rptwsthi Jan 18 '13 at 08:32
  • Thansks @rptwsthi.. It is working fine for me. – shivam Jan 18 '13 at 09:07
  • Most Welcome dear! But tryna look around. I found this solution on my first google result for ur question.. :) – rptwsthi Jan 18 '13 at 09:09
  • Thanks. I'll keep this thing in mind in future. But i had two questions for permission alert. One for access gallery and second for access contacts. Main thing is that i am unable to show permission alert in iOS6 device(For contacts) because my app is compatible with iOS5. – shivam Jan 18 '13 at 09:13
  • Another link for You!! http://stackoverflow.com/questions/12648244/programmatically-request-access-to-contacts-in-ios-6 – rptwsthi Jan 18 '13 at 09:16
  • It is not working. My app is closing with this issue "implicit declaration of ABAddressBookCreateWithOptions is invalid in c99" – shivam Jan 18 '13 at 10:59

1 Answers1

1

you can show this by help of ALAssetsLibrary library & ALAuthorizationStatus

ALAuthorizationStatus status = [ALAssetsLibrary authorizationStatus];

    if (status != ALAuthorizationStatusAuthorized) {
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Message" message:@"permission alert message" delegate:nil cancelButtonTitle:@"Close" otherButtonTitles:nil, nil];
        [alert show];
    }
Ravindra Bagale
  • 17,226
  • 9
  • 43
  • 70