iOS Google+ Safari无法打开页面,因为地址无效 [英] iOS Google+ Safari cannot open page because address is invalid
本文介绍了iOS Google+ Safari无法打开页面,因为地址无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个应用程序,一个是免费的,另一个是付费版本。我已经实施了谷歌+分享付费和工作正常。但是,当我将代码复制到我的免费版本时,它无效。我有一个Google apis项目,并为两个iOS应用添加了两个客户端。
I have two apps one is free and another is paid version. I have implemented google+ share on paid and its working fine. But when I copied code to my free version it doesn't work. I have one Google apis project and added two clients for both iOS apps.
我得到Safari无法打开页面,因为地址无效错误分享或取消后它确实不打开我的应用程序。
I get "Safari cannot open page because address in invalid" erro after sharing or cancel and it does not open my app.
请帮助
我按照https://developers.google.com/+/mobile/ios/share#detecting_if_a_post_was_successfully_shared
推荐答案
将此方法添加到appdelgate中
Add this method into your appdelgate
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
NSLog(@"%@",sourceApplication);
// Handle Google+ sign-in button URL.
if ([signInButton_ handleURL:url
sourceApplication:sourceApplication
annotation:annotation]) {
return YES;
}
return NO;
}
这篇关于iOS Google+ Safari无法打开页面,因为地址无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文