Last active
August 29, 2015 14:01
-
-
Save brennanMKE/a36ac57ac5f4494f4bd5 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
- (void)openLyft { | |
NSURL *lyftURL =[NSURL URLWithString:@"fb275560259205767://"]; | |
if ([[UIApplication sharedApplication] canOpenURL:lyftURL]) { | |
[[UIApplication sharedApplication] openURL:lyftURL]; | |
} | |
else { | |
NSString *appStoreLink = @"itms-apps://itunes.apple.com/us/app/lyft/id529379082?mt=8"; | |
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:appStoreLink]]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment