requestAuthorization(_:)
Displays a user interface so that the user can authorize whether your app may view the media library’s contents.
Declaration
class func requestAuthorization(_ completionHandler: @escaping @Sendable (MPMediaLibraryAuthorizationStatus) -> Void)class func requestAuthorization() async -> MPMediaLibraryAuthorizationStatusParameters
- completionHandler:
A block that the system calls after the user chooses whether to authorize the app.
- status
The status chosen by the user.