Last active
August 29, 2015 14:25
-
-
Save daniel-beard/8238e12afd926a234813 to your computer and use it in GitHub Desktop.
This file contains 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
SEL selector = NSSelectorFromString(@"setAuthorizationStatus:forBundleIdentifier:"); | |
NSMethodSignature *methodSignature = [CLLocationManager methodSignatureForSelector:selector]; | |
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSignature]; | |
invocation.selector = selector; | |
CLAuthorizationStatus status = kCLAuthorizationStatusAuthorizedAlways; | |
NSString *identifier = @"com.test.testapp"; | |
[invocation setArgument:&status atIndex:2]; | |
[invocation setArgument:&identifier atIndex:3]; | |
[invocation invokeWithTarget:[CLLocationManager class]]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment