Created
October 16, 2014 15:05
-
-
Save aleciogomes/5cabfca21ba67cc99958 to your computer and use it in GitHub Desktop.
iOS 8 Location Services request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // BEFORE the map actual use (maybe on viewDidLoad) you should call this | |
| // You may change the selector do adequate to your app location use (in use or always) | |
| self.manager = [CLLocationManager new]; | |
| SEL requestSelector = NSSelectorFromString(@"requestWhenInUseAuthorization"); | |
| if ([self.manager respondsToSelector:requestSelector]) { | |
| ((void (*)(id, SEL))[self.manager methodForSelector:requestSelector])(self.manager, requestSelector); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- All the string tags can, but shouldn't, be empty --> | |
| <!-- When your app uses location when active (foreground) --> | |
| <key>NSLocationWhenInUseUsageDescription</key> | |
| <string>Used in 'Near Me' and 'Directions'</string> | |
| <!-- When your app uses location always (including background) --> | |
| <key>NSLocationAlwaysUsageDescription</key> | |
| <string>Used to track your location and inform your GF in case of cheating.</string> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment