Presenting camera permission dialog in iOS 8

后端 未结 9 1541
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-29 17:45

When my app tries to access the camera for the first time on iOS 8, the user is presented with a camera permission dialog, much like the microphone one for microphone access

9条回答
  •  一整个雨季
    2020-11-29 18:28

    For me this work on iOS7 and iOS8:

        ALAuthorizationStatus status = [ALAssetsLibrary authorizationStatus];
    
        switch (status) {
            case ALAuthorizationStatusAuthorized:
                break;
    
            case ALAuthorizationStatusRestricted:
            case ALAuthorizationStatusDenied:
                break;
    
            case ALAuthorizationStatusNotDetermined:
                break;
        }
    

提交回复
热议问题