iOSLocation.RequestAlwaysAuthorization

From Xojo Documentation

Method

iOSLocation.RequestAlwaysAuthorization()

Supported on Mobile (iOS).

Request authorization for this app to use location information at any time.

Notes

This requires the plist key "NSLocationAlwaysUsageDescription" 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