1

Hello I am trying to get google play games sign in on my iOS app. I have installed the sdk manually and did everything as the Get started tutorial on the google website says. But when I click the sign in button the app takes me to safari and I am getting those messages in the console:

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)"

even after I clicked allow on permissions it takes me back to my app but nothing happen even the func:

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

}

is not being called at all. please help

thats my code to sign in:

- (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];
}
Dor Rokah
  • 11
  • 2

1 Answers1

1

Here's what I found about "This app is not allowed to query for scheme".

I think this is due to the changes to the new ios version, ios9.

Found this on this 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.

Check the code implementation in this SO thread for more info.

Community
  • 1
  • 1
ReyAnthonyRenacia
  • 17,219
  • 5
  • 37
  • 56