Google+ iOS Sign In Address Invalid Problem

NOVEMBER 19, 2013

If you follow 'Google+ Sign-In for iOS' tutorial, you will encounter the 'Cannot Open Page (Safari cannot open the page because the address is invalid)' problem. Here is how to fix it.

When you are integrating 'Google+ Sign In' into iOS app, you might have encountered this screen: Cannot Open Page. It's eventually redirected to Google home page. Google documentation is missing a piece: URL type. In order to make it work, you need to set URL Types in Projects > Target > Info > URL Types. See the screenshot below:

Or you can insert the same thing into info.plist. Like the one below:

After you've done this, your callback method should be called by Safari now.

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation