在Xcode 4.5中打开Goog​​le+应用程序 [英] Open Google+ Application in Xcode 4.5

查看:77
本文介绍了在Xcode 4.5中打开Goog​​le+应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了需要Google+的社交应用程序.我知道我可以将Google+作为Safari的链接打开(这不是真正的用户友好型,只需要切换应用即可发布内容).这段代码打开了Safari的链接:

I making a social application which requires Google+. I know that I can open Google+ as a link to Safari (Which isn't really user Friendly having to switch apps just to post something). This code opens the link to 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的链接).我感谢所有花时间阅读我的帖子的人(即使您没有看过它也是如此):)

But is there a way to detect if Google+ Application is installed and open the application there (And if it isn't then open the link to Safari). I thank Everyone who take the time to read my post (Even if you didn't) :)

推荐答案

据此

According to this post it is not possible to run an app within another app but it is possible to launch any app that registers a URL Scheme. You should check if that's the case for the Google+ Application.

编辑 Google+似乎没有出现在列表中:-(

EDIT Google+ doesn't seem to be on the list :-(

这篇关于在Xcode 4.5中打开Goog​​le+应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆