Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google plus API doesn't return to app on login

Obviously I must be missing something.

When I press my Google + button, it opens up safari and prompts for the login. Everything is fine until I complete the login procress. Safari tells me "Cannot open the Page -- Safari cannot open the page because the address is invalid". It never takes me back to my app, but keeps Safari open and goes to google.com.

I was thinking this would take care of that, but break points aren't ever going off in this method. Maybe I'm misunderstanding how it works.

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
    return [GPPURLHandler handleURL:url sourceApplication:sourceApplication annotation:annotation];
}

Thanks for any help you can provide

like image 431
Miles Avatar asked Nov 29 '22 02:11

Miles


1 Answers

Take look to the Bundle Identifier that is in your project and that you have registered with https://code.google.com/apis/console . Both of them should be same. After that make sure also you have set that same URL Schemes in URL Types in your application plist file.

like image 172
Marmik Avatar answered Dec 06 '22 12:12

Marmik