0

My goal is to create custom UIActivities for Google+, Pinterest and LinkedIn for social share. And my custom activities should appear in UIActivityViewController only if native apps are absent (aren't installed - means native share won't appear in UIActivityViewController).

But I don't know how to check whether these apps are installed Is there any possibilities for this?

Bogdan Laukhin
  • 1,454
  • 2
  • 17
  • 26

1 Answers1

2

You have to know the URL Scheme to access the app by canOpenURL like:

NSURL *likedInURL = [NSURL URLWithString:@"linkedin://profile?id=[id]"];
if ([[UIApplication sharedApplication] canOpenURL: likedInURL]) {
    [[UIApplication sharedApplication] openURL: likedInURL];
} else {
    // There is no app installed
}

Take a look here for more schemes: http://pureoxygenlabs.com/10-app-url-schemes-for-marketers/

I hope this can help you.

J. Lopes
  • 1,336
  • 16
  • 27