Food Mood
Food Mood

Reputation: 89

iOS: google+ sdk redirects to google.com after giving google+ permission instead of redirecting back to app

I am trying get google+ to go back to my app after the user gives it permission just like the sample app that is included in the iOS google+ sdk, however it redirects to google.com instead. Anyone know what I did wrong or what to do?Any tips will be appreciated.

Upvotes: 0

Views: 2285

Answers (1)

Ian Barber
Ian Barber

Reputation: 19970

The way Google gets back to your app is via a custom URL scheme, which is normally your bundle identifier, hence Wain's question.

You'll need to set that up in both your Info.plist (or the Project settings) as a custom URL scheme, and in the API console for the client ID for your project.

For adding to your app: https://developers.google.com/+/mobile/ios/getting-started#step_4_add_a_url_type

For adding to the API console: https://developers.google.com/+/mobile/ios/getting-started#step_1_creating_the_apis_console_project

Make sure both of those have the same value, then the sign-in should be redirected to your app properly.

Upvotes: 5

Related Questions