iOSLocation.RequestInUseAuthorization

From Xojo Documentation

Method

iOSLocation.RequestInUseAuthorization()

Supported on Mobile(iOS).

Request authorization for this app to use location information only when it is active.

Notes

This requires the plist key "NSLocationWhenInUseUsageDescription" of the app to be populated.

Sample Code

If myLocation.AuthorizationState = iOSLocation.AuthorizationStates.AuthorizedWhenInUse Then
// we've got our requested authorization state, start getting LocationChanged events
MyLocation.Enabled = True
Else
// we don't have authorization yet, so ask for it
MyLocation.RequestInUseAuthorization
End If