iPhoneSettings.locationServiceEnabledByUser Manual     Reference     Scripting  
Scripting > Runtime Classes > iPhoneSettings
iPhoneSettings.locationServiceEnabledByUser
このドキュメントは有志により翻訳されたもので、オフィシャルではありません。オリジナルのページはこちら
This document is unofficially translated by users.Please see the original document here.

翻訳に関する修正など、ご連絡はこちらまで。
Please send e-mail to here, when you have any question about the translation.

編集 (GitHub)

static var locationServiceEnabledByUser : bool

Description

The user can enable or disable location services altogether from the Settings application by toggling the switch in Settings>General>LocationServices.

You should check this property before starting location updates to determine if the user has location services enabled for the current device. If this property contains the value false and you start location updates anyway, the CoreLocation framework prompts the user with a confirmation panel asking whether location services should be reenabled.