iOS Google 登录不允许用户代理
<p><p>我已经在 Objective-C iOS 应用程序中集成了谷歌登录,它工作正常,但现在它给出了这个错误一段时间。
<a href="/image/AopkL.png" rel="noreferrer noopener nofollow"><img src="/image/AopkL.png" alt="enter image description here"/></a> </p>
<p>这是点击按钮时的登录代码:</p>
<pre><code>.uiDelegate = self;
.delegate = self;
[ setScopes:@[@"https://www.googleapis.com/auth/contacts.readonly",@"https://www.google.com/m8/feeds/"]];
[ signIn];
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>转成Objective-C后试试这个</p>
<pre><code> GIDSignIn.sharedInstance().delegate = self
GIDSignIn.sharedInstance().uiDelegate = self
GIDSignIn.sharedInstance().scopes.append("https://www.googleapis.com/auth/plus.stream.read")
GIDSignIn.sharedInstance().scopes.append("https://www.googleapis.com/auth/plus.me")
GIDSignIn.sharedInstance().hasAuthInKeychain()
</code></pre>
<p>也尝试在每次登录前退出</p>
<pre><code> [ signOut];
[ signIn];
</code></pre></p>
<p style="font-size: 20px;">关于iOS Google 登录不允许用户代理,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/47875273/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/47875273/
</a>
</p>
页:
[1]