Not automatically login to Google+ using UIWebView

2019-07-18 21:11发布

  • I have a question about authentication with UIWebView.

  • I want to login in webview in plus.google.co

  • I sign in in google plus one time as shown in
    https://developers.google.com/+/mobile/ios/sign-in

  • When user go to google+ page again in UIWebView then program should be automatically logged in and save the user's session. But in fact it is not keep logged in.How can i keep user logged in for google+ although user is one time sign in for Google+ in my application.

  • I also checked condition for this as :[[GPPSignIn sharedInstance] authentication] and it return true that i am logged in already.but when i checked in uiwebview by pushing new ViewController then it ask me to sign in.

  • And When i open plus.google.com in safari in iPhone then it show me as a login user.

    I searched a lot but can not find an answer.please help me out from this.

2条回答
Anthone
2楼-- · 2019-07-18 21:22

Sign In with Google is now supported through the new Google Sign In iOS SDK. Migration instructions for users of the Google+ Sign In SDK are available here.

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2019-07-18 21:32

If I understand your question correctly you have implemented sign in with the iOS SDK, but you would like to enable sign in for your mobile web browser following these instructions:

https://developers.google.com/+/mobile/ios/sign-in

These are for a native iOS application. To implement sign in for mobile web you should follow the instructions for sign in on the web:

https://developers.google.com/+/web/signin/

Sorry if this doesn't answer your question directly, but if it doesn't please give more details about your problem.

查看更多
登录 后发表回答