【发布时间】:2012-12-29 23:56:18
【问题描述】:
我制作了一个需要 Google+ 的社交应用程序。我知道我可以打开 Google+ 作为 Safari 的链接(这对于用户来说并不是真正友好的,必须切换应用程序只是为了发布一些东西)。此代码打开 Safari 的链接:
-(IBAction)Google+:(id)sender {
NSLog(@"Google+");
//The link will go to Stack Overflow Google+ Page
NSURL *GooglePlus = [NSURL URLWithString:@"https://plus.google.com/+StackExchange/posts"];
[[UIApplication sharedApplication] openURL:GooglePlus];
}
但是有没有办法检测是否安装了 Google+ 应用程序并在那里打开应用程序(如果没有,则打开到 Safari 的链接)。我感谢所有花时间阅读我的帖子的人(即使你没有):)
【问题讨论】:
-
这可能会有所帮助:danielamitay.com/blog/2011/2/16/…
-
@Ponf 的回复可能正是您想要的。
标签: ios ios-simulator social-networking xcode4.5 google-plus