iOS photo permissions to ask for second time

后端 未结 2 1235
死守一世寂寞
死守一世寂寞 2021-01-16 07:35

I am currently using alasset which asks for permission for first time. If want to pop permission second time or every time when user has blocked it, how it is possible.

2条回答
  •  Happy的楠姐
    2021-01-16 08:21

    That dialog isn't controlled by the app, so no API for that.

    You can reset things as a user in the settings app (IIRC) but no programmatic way.


    To get the current authorization status:

    [ALAssetsLibrary authorizationStatus];
    
    (+ (ALAuthorizationStatus)authorizationStatus)
    

    Also, methods to get assets taking access error blocks, e.g.:

    - (void)assetForURL:(NSURL *)assetURL
            resultBlock:(ALAssetsLibraryAssetForURLResultBlock)resultBlock
           failureBlock:(ALAssetsLibraryAccessFailureBlock)failureBlock
    

提交回复
热议问题