Created
October 14, 2013 14:15
-
-
Save daviddulak/6976348 to your computer and use it in GitHub Desktop.
This is a simple way to let your PhoneGap app know if Google Maps App is installed on the device
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
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"comgooglemaps://"]]) { | |
NSString *jsString = @"window.googleMapsAppInstalled = true;"; | |
[self.webView stringByEvaluatingJavaScriptFromString:jsString]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment