Far*_*eid 5 objective-c ios google-plus google-signin
由于Google+ iOS SDK使用移动版Safari对用户进行身份验证,我的某个应用程序被拒绝了.我已浏览网页,我一直在关注此链接中的解决方案,以启动我的应用并运行Google+.我最近看到了Google登录iOS的公告,它解决了使用SDK提供的webview在应用内进行身份验证的问题.
这就是出现问题的地方,我希望用户能够在Google+上分享,但我无法在Google登录SDK中看到要分享的选项,而最新的Google+ SDK仍在使用移动版Safari进行身份验证.我现在有两个问题:
NSURL *shareURL = [NSURL URLWithString:@"https://blog.xamarin.com/keep-users-engaged-with-ios-9s-sfsafariviewcontroller/"];
// Construct the Google+ share URL
NSURLComponents* urlComponents = [[NSURLComponents alloc]
initWithString:@"https://plus.google.com/share"];
urlComponents.queryItems = @[[[NSURLQueryItem alloc]
initWithName:@"url"
value:[shareURL absoluteString]]];
NSURL* url = [urlComponents URL];
if ([SFSafariViewController class]) {
// Open the URL in SFSafariViewController (iOS 9+)
SFSafariViewController* controller = [[SFSafariViewController alloc]
initWithURL:url];
controller.delegate = self;
[self presentViewController:controller animated:YES completion:nil];
} else {
// Open the URL in the device's browser
[[UIApplication sharedApplication] openURL:url];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
672 次 |
| 最近记录: |