iOS14 사진 앨범 권한 이슈 "PHPhotoLibrary"

2020. 10. 21. 09:35Development/[iOS] Swift, ObjC

728x90

ios14의 경우 사진 권한을 앱별로, 그리고 앱안에서도 "선택한 사진, 전체사진, 거부" 등으로 제어할 수 있게 되었는데

현재 개발 테스트간 파악한 바로는 이게 기능상의 맹점이 보인다.

 

사진 권한을 분명히, "선택한 사진" 또는 "거부"로 하였음에도 

전체 사진을 불러올수 있는 상황이다.

 

PHPhotoLibrary 의 authorizationStatus 을 통해

아래 변수 코멘트 처럼 권한상태(PHAuthorizationStatus)를 확인할 수 있는데,

 

 

 PHAuthorizationStatusNotDetermined = 0, // User has not yet made a choice with regards to this application

 PHAuthorizationStatusRestricted,        // This application is not authorized to access photo data.

                                            // The user cannot change this application’s status, possibly due to active restrictions

                                            //   such as parental controls being in place.

 PHAuthorizationStatusDenied,            // User has explicitly denied this application access to photos data.

 PHAuthorizationStatusAuthorized,        // User has authorized this application to access photos data.

 PHAuthorizationStatusLimited API_AVAILABLE(ios(14)), // User has authorized this application for limited photo library access.   Add PHPhotoLibraryPreventAutomaticLimitedAccessAlert = YES to the application's Info.plist to prevent the automatic alert to update the users limited library selection. Use -[PHPhotoLibrary(PhotosUISupport) presentLimitedLibraryPickerFromViewController:] from PhotosUI/PHPhotoLibrary+PhotosUISupport.h to manually present the limited library picker.

 

PHAuthorizationStatusDenied 가 되어 있음에도 사진을 모두열람할 수 있다.

아직 스토어에 업로드하지 않았기에 권한을 막았음에도 통과가 되는 현상을 방치할 경우

Reject의 사유가 될지는 두고봐야할 것 같다.

 

- 추후 포스트를 갱신하겠습니다.

728x90