Skip to content

Instantly share code, notes, and snippets.

@AndrewWCarson
Last active May 10, 2019 21:33
Show Gist options
  • Save AndrewWCarson/8b4a907c76b926fc16ce8b26d0860471 to your computer and use it in GitHub Desktop.
Save AndrewWCarson/8b4a907c76b926fc16ce8b26d0860471 to your computer and use it in GitHub Desktop.
Returns True/False string for use detecting if Location Services is turned on.
#!/usr/bin/python
import CoreLocation
def locationServicesEnabled():
if CoreLocation.CLLocationManager.locationServicesEnabled():
return True
else:
return False
if __name__ == "__main__":
print locationServicesEnabled()
@AndrewWCarson
Copy link
Author

Formatting stuff because reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment