RSDPermissionStepViewController
open class RSDPermissionStepViewController : RSDStepViewController
RSDPermissionStepViewController
is a customizable view controller that is designed to be used to
request and/or check the permission status for this view.
-
Declaration
Swift
override open func instantiateStepViewModel(for step: RSDStep, with parent: RSDPathComponent?) -> RSDStepViewPathComponent
-
Override viewDidAppear to set up notification handling.
Declaration
Swift
open override func viewDidAppear(_ animated: Bool)
-
Present an alert letting the user know that they do not have authorizations that are required to run this task.
Declaration
Swift
override open func handleAuthorizationFailed(status: RSDAuthorizationStatus, permission: RSDStandardPermission)
-
Override goForward to add in requesting permissions before continuing.
Declaration
Swift
override open func goForward()
-
Request the given permissions and then call the completion once all permssions are requested.
Note
syoung 04/04/2019 This implementation is currently limited to only requesting certain permissions using this method. For certain permission types, the requesting flow is complicated enough that trying to generalize the handling and the messaging is not appropriate.
Declaration
Swift
open func requestPermissions(_ permissions: [RSDStandardPermission], _ completion: @escaping ((RSDAuthorizationStatus, RSDStandardPermission?) -> Void))
Parameters
permissions
The permissions to be requested.
completion
The completion handler to call when finished.