requestAuthorization(handler:)
Requests authorization to receive notifications about fall detection events.
Declaration
func requestAuthorization(handler: @escaping (CMAuthorizationStatus) -> Void)Parameters
- handler:
A block that is called by the system after the user accepts or declines the authorization request.
The system passes the following parameter:
statusThe authorization status chosen by the user.
Discussion
As soon as the user authorizes fall detection, the system calls the delegate’s fallDetectionManager(_:didDetect:completionHandler:) method and passes the latest fall detection event.