Share on Google+ with Google Login for iOS

One of my apps was rejected due to the Google+ iOS SDK, using mobile safari to authenticate the user. I surf the Internet and I follow the solution in this link to download the app on Google+. I recently saw an iOS login ad that fixes the authentication problem in the app using the webview provided by the SDK.

This is where the problem arises, I want the user to be able to share on Google+, but I can’t see this option in the SDK to log in to Google, and the last Google+ SDK still uses mobile safari for authentication. I have two questions:

  • Can I use both SDKs at the same time for authentication and sharing and using authCode?
  • Did I miss something in both of these SDKs for login or sharing? Can Google+ provide the ability to authenticate in the app or Google Sign-in to share them on Google +?
+5
source share
1 answer
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 browser [[UIApplication sharedApplication] openURL:url]; 
0
source

All Articles