let accessLevel : PHAccessLevel = .readWrite
let phStatus = PHPhotoLibrary.authorizationStatus(for: accessLevel)
if (phStatus == .notDetermined) {
PHPhotoLibrary.requestAuthorization(for: accessLevel) {
newStatus in
if (newStatus == .limited) {
var conf = PHPickerConfiguration()
conf.selectionLimit = 1
conf.filter = .any(of: [.images, .livePhotos])
let picker = PHPickerViewController(configuration: conf)
picker.delegate = self
self.present(picker, animated: true)
}
}
}
I use the code above to test iOS 14 new feature Limited Photos Library. In the code I use new Api authorizationStatus and requestAuthorization, and successfully get .limited status. But despite of .limited status, iOS 14 still display all photo of the library. Can anyone help me to solve this?