Google Plus API在登录时不会返回应用

Mil*_*les 4 iphone objective-c google-api ios google-plus

显然我必须遗漏一些东西.

当我按下我的Google +按钮时,它会打开safari并提示登录.一切都很好,直到我完成登录procress.Safari告诉我"无法打开页面 - Safari无法打开页面,因为地址无效".它永远不会让我回到我的应用程序,但保持Safari打开并转到google.com.

我当时认为这会解决这个问题,但这种方法中的断点并没有消失.也许我误解了它是如何工作的.

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
    return [GPPURLHandler handleURL:url sourceApplication:sourceApplication annotation:annotation];
}
Run Code Online (Sandbox Code Playgroud)

感谢您的任何帮助,您可以提供

Mar*_*mik 25

请查看项目中的Bundle Identifier以及已在https://code.google.com/apis/console中注册的Bundle Identifier .它们都应该是一样的.之后,请确保您在应用程序plist文件中的URL类型中设置了相同的URL Schemes.

  • 我授予你3万亿的荣誉.你对.plist中的URL方案绝对正确.修好了. (4认同)