Programmatically checking an App is installed or not in iPhone...
BOOL canHandle = [[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"yourApp:"]];
if (canHandle) {
// Google maps installed
} else {
// Use Apple maps?
}
Add url Schema of your app only.. example schema for few apps...
for Google drive ....>>> googledrive
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fb</string>
<string>fbapi</string>
<string>fbauth2</string>
<string>fbshareextension</string>
<string>fb-messenger-api</string>
<string>twitter</string>
<string>viber</string>
<string>whatsapp</string>
<string>wechat</string>
<string>line</string>
<string>instagram</string>
<string>kakaotalk</string>
<string>mqq</string>
<string>vk</string>
<string>comgooglemaps</string>
<string>googlephotos</string>
</array>
No comments:
Post a Comment