Skip to content

Commit 6b7d740

Browse files
author
Emilio Pavia
committed
Add support for .limited PHPhotoLibrary authorization status
1 parent eb89772 commit 6b7d740

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ScienceJournal/UI/PhotoLibraryDataSource.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class PhotoLibraryDataSource: NSObject, PHPhotoLibraryChangeObserver {
9393
let authStatus = PHPhotoLibrary.authorizationStatus()
9494
switch authStatus {
9595
case .denied, .restricted: return false
96-
case .authorized: return true
96+
case .authorized, .limited: return true
9797
case .notDetermined:
9898
// Prompt user for the permission to use the camera.
9999
PHPhotoLibrary.requestAuthorization({ (status) in
@@ -103,6 +103,7 @@ class PhotoLibraryDataSource: NSObject, PHPhotoLibraryChangeObserver {
103103
}
104104
})
105105
return false
106+
@unknown default: return false
106107
}
107108
}
108109

0 commit comments

Comments
 (0)