gpt4 book ai didi

ios - Google Play 游戏在 iOS 上登录错误

转载 作者:行者123 更新时间:2023-11-29 11:56:17 24 4
gpt4 key购买 nike

您好,我正在尝试在我的 iOS 应用程序上登录 Google Play 游戏。我已经手动安装了 sdk,并按照 google 网站上的入门教程所说的做了所有事情。但是,当我单击登录按钮时,应用程序会将我带到 safari,并且我会在控制台中收到这些消息:

2016-08-14 14:32:26.450 פקודה![34477:5811630] -canOpenURL: failed for URL: "com.google.gppconsent.2.4.1://" - error: "This app is not allowed to query for scheme com.google.gppconsent.2.4.1"
2016-08-14 14:32:26.452 פקודה![34477:5811630] -canOpenURL: failed for URL: "com.google.gppconsent.2.4.0://" - error: "This app is not allowed to query for scheme com.google.gppconsent.2.4.0"
2016-08-14 14:32:26.454 פקודה![34477:5811630] -canOpenURL: failed for URL: "com.google.gppconsent.2.3.0://" - error: "This app is not allowed to query for scheme com.google.gppconsent.2.3.0"
2016-08-14 14:32:26.455 פקודה![34477:5811630] -canOpenURL: failed for URL: "com.google.gppconsent.2.2.0://" - error: "This app is not allowed to query for scheme com.google.gppconsent.2.2.0"
2016-08-14 14:32:26.456 פקודה![34477:5811630] -canOpenURL: failed for URL: "com.google.gppconsent://" - error: "(null)"
2016-08-14 14:32:26.457 פקודה![34477:5811630] -canOpenURL: failed for URL: "hasgplus4://" - error: "(null)"
2016-08-14 14:32:26.486 פקודה![34477:5811630] -canOpenURL: failed for URL: "googlechrome-x-callback:" - error: "(null)"
2016-08-14 14:32:26.487 פקודה![34477:5811630] -canOpenURL: failed for URL: "googlechrome:" - error: "(null)"

即使在我点击了允许权限后,它也会将我带回我的应用程序,但即使是 func 也没有任何反应:

- (void)didFinishGamesSignInWithError:(NSError *)error {
if (!error)
NSLog(@"GooglePlayGames finished signing in!");
else
NSLog(@"***Error signing in! %@", [error localizedDescription]);

}

根本没有被调用。请帮忙

这就是我的登录代码:

- (void)viewDidLoad
{
[super viewDidLoad];

[GIDSignIn sharedInstance].clientID = kClientID;
[GPGManager sharedInstance].statusDelegate = self;
[GIDSignIn sharedInstance].uiDelegate = self;

_currentlySigningIn = [[GPGManager sharedInstance] signInWithClientID :kClientID silently:YES];
}

# pragma mark -- GIDSignInUIDelegate methods

- (void)signIn:(GIDSignIn *)signIn
didSignInForUser:(GIDGoogleUser *)user
withError:(NSError *)error
{
NSLog(@"%@",user);
}


# pragma mark -- GPGStatusDelegate methods

- (void)didFinishGamesSignInWithError:(NSError *)error {
if (!error)
NSLog(@"GooglePlayGames finished signing in!");
else
NSLog(@"***Error signing in! %@", [error localizedDescription]);

}
- (void)didFinishGamesSignOutWithError:(NSError *)error {
if (error)
NSLog(@"Received an error while signing out %@", [error localizedDescription]);
else
NSLog(@"Signed out!");
}

- (IBAction)signInButtonWasPressed:(id)sender {
[[GPGManager sharedInstance] signInWithClientID:kClientID silently:NO];
}

- (IBAction)signOutButtonWasPressed:(id)sender {
[[GPGManager sharedInstance] signOut];
}

最佳答案

这是我发现的关于 “不允许此应用程序查询方案” 的内容。

我认为这是由于新 ios 版本 ios9 的更改所致。

在这个 blog 上找到这个.

The key bits regarding changes to URL schemes in iOS 9 is the Privacy and Your Apps session, starting at around the 9 minute mark under the heading “App Detection”.

There are two URL-related methods available to apps on iOS that are effected: canOpenURL and openURL. These are not new methods and the methods themselves are not changing. As you might expect from the names, “canOpenURL” returns a yes or no answer after checking if there is any apps installed on the device that know how to handle a given URL. “openURL” is used to actually launch the URL, which will typically leave the app and open the URL in another app.

检查此SO thread中的代码实现了解更多信息。

关于ios - Google Play 游戏在 iOS 上登录错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38942020/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com