Tag: 谷歌login

Google SignIn SFSafariViewController / WebView在接受权限后redirect到Google.com

我试图实现我使用Cocoapods安装的新的Google SignIn库。 部署目标是8.4和Im在9.0.2设备中testing。 1-我有适当的plist文件与clientID和reverseID 我有设置的urltypes 3-我有AppDelegate作为GIDSignIn的代理[GIDSignIn sharedInstance].delegate = self; – (void)signIn:(GIDSignIn *)signIn didSignInForUser:(GIDGoogleUser *)user withError:(NSError *)error 我有- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return [[GIDSignIn sharedInstance] handleURL:url sourceApplication:sourceApplication annotation:annotation]; } – (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return [[GIDSignIn sharedInstance] handleURL:url sourceApplication:sourceApplication annotation:annotation]; } 5 – 我使用自动GIDSignInButton类和放置在UIViewController的子类,所以我不需要实现GIDSignIn uiDelegate方法。 但是我仍然有[[GIDSignIn sharedInstance] setUiDelegate:self]; […]

自定义Google Sign In在GIDSignInDelegate协议上抛出exception

我正在用obj-c编写一个iOS应用程序,并使用Google SignIn SDK来执行Google SignInstream程。 我想能够自定义button和动作一点,所以我继续执行GIDSignInDelegate自己的协议基于他们的文档。 但它没有理由抛出和exception。 这是我的视图控制器的最小代码。 viewcontroller.m #import "ViewController.h" #import <FBSDKLoginKit/FBSDKLoginKit.h> @interface ViewController () @property (weak, nonatomic) IBOutlet UIButton *GoogleSignIn; @end @implementation ViewController – (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. } – (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can […]

Googlelogin不会返回到我的应用程序

我在使用Googlelogin时遇到问题,无法redirect到我的应用。 我已经按照步骤( https://developers.google.com/identity/sign-in/ios/start-integrating ),安装了cocoapods,下载了GoogleService-Info.plist(将其添加到我的所有目标),添加URLtypes(我的捆绑包标识符,然后是我的反向客户端ID到我的目标,并按照步骤逐行。 这里是plist CFBundleURLTypes的源代码: <dict> <key>CFBundleTypeRole</key> <string>Editor</string> <key>CFBundleURLSchemes</key> <array> <string>MY_REVERSE_CLIENT_ID</string> </array> <key>CFBundleURLName</key> <string>MY_BUNDLE_ID</string> </dict> <dict> <key>CFBundleTypeRole</key> <string>Editor</string> <key>CFBundleURLSchemes</key> <array> <string>MY_BUNDLE_ID</string> </array> <key>CFBundleURLName</key> <string>MY_BUNDLE_ID</string> </dict> 在App Delegate中,我configuration了[GGLContext sharedInstance],并在应用程序的openURL方法中添加了 – return [[GIDSignIn sharedInstance] handleURL:url sourceApplication:sourceApplication annotation:annotation]; 如果没有安装Google Plus应用程序,Safari会在应用程序中打开并且一旦login,委托callback方法将按照预期工作。 我相信这是iOS9的一个问题。 这在iOS8以前工作。 我还在我的plist中添加了com-google-gidconsent和com-google-gidconsent-google到LSApplicationQueriesSchemes,因为我看到另一篇文章说这可能是问题。 我已经在Google开发人员门户网站上检查过,我的包ID与我的项目的包ID以及客户端ID和反向客户端ID是否正确匹配。 我有三个目标(生产,分期和testing)。 我目前只是试图让生产目标工作。 我有另一个视图控制器,用户点击一个谷歌button,然后该button的操作是[[GIDSignIn sharedInstance] signIn]; 这使用户访问Google Plus应用程序,并提示用户select一个帐户。 一旦select一个帐户,谷歌加应用程序然后询问用户我的应用程序是否可以访问他们的信息。 一旦用户点击确定,就没有callback到我的应用程序。 用户只是停留在Google Plus应用程序中。 我在应用程序openURL方法中有一个断点,它永远不会被击中。 有趣的是,如果我使用com-google-gidconsent-google和com.google.gidconsent在我的反向客户端id中configuration我的plist,应用程序的openURL方法会被击中,但是 […]

Google SignIn:无法断开iOS应用

我已经在iOS应用程序中实现了Google SignIn,并且可以第一次login到Google帐户。 但是,当我注销并尝试重新login时,我得到了账户权限屏幕,如下图所示,而不是SignIn屏幕。 以下是我用过的代码。 var signIn = GIDSignIn.sharedInstance() signIn.delegate = self signIn.uiDelegate = self 以下是注销和断开连接的代码 GIDSignIn.sharedInstance().signOut() GIDSignIn.sharedInstance().disconnect() 断开连接后,我再次尝试使用下面的代码login GIDSignIn.sharedInstance().signIn() 注销和断开连接后,如何显示login屏幕?

使用未parsing的标识符“GGLContext”

我在我的ios Swift应用程序中集成了Google Sign-In。 我在这里( https://developers.google.com/identity/sign-in/ios/sign-in?ver=swift )上的官方说明, 这是我的衔接标题: #ifndef Header_h #define Header_h #endif /* Header_h */ #import <CommonCrypto/CommonCrypto.h> #import <FBSDKCoreKit/FBSDKCoreKit.h> #import <FBSDKLoginKit/FBSDKLoginKit.h> #import <GoogleSignIn/GoogleSignIn.h> 当我在我的AppDelegate.swift函数中调用该行时 GGLContext.sharedInstance().configureWithError(&configureError) 在里面。 它说 Use of unresolved identifier 'GGLContext' 任何帮助表示赞赏。

Facebook授权w /权限请求收益“找不到页面”

在过去的几个星期的某个地方,授权Facebook的iOS调用失败,出现“Page Not Found”。 对于没有安装应用程序的用户,或者应用程序的权限已经更改,用户必须批准其他权限,才会发生这种情况。 无论Facebook应用程序处理用户身份validation还是Safari或popup对话框,都会发生这种情况。 所有redirect到“页面未find”页面。 通过debugging器挖掘,我发现初始URL请求(app idreplace“[app_id]”)的login屏幕: https://m.facebook.com/dialog/oauth?type=user_agent&display=touch&redirect_uri=fb[app_id]%3A%2F%2Fauthorize&sdk=2&scope=user_location%2Cuser_relationships%2Cemail%2Cpublish_stream%2Coffline_access&client_id=[app_id] 以下url正在通过login尝试(我假设由用户没有足够的权限的URL): http://www.facebook.com/dialog/permissions.request?_path=permissions.request&app_id=[appid]&redirect_uri=fb[appid]%3A%3F%3Fauthorize&sdk=2&display=touch&type=user_agent&fbconnect=1&perms=user_location%2Cuser_relationships% 2Cemail%2Cpublish_stream%2Coffline_access&SSO = iphone-狩猎&from_login = 1 我已经检查过,Xcode中列出的Bundle ID与我在Facebook中的应用程序设置列出的相同。 由于未显示权限页面,所以新用户无法添加应用程序。 过去我的应用程序的旧版本也以相同的方式失败。 可能是什么问题呢?

iOS谷歌login查看丢失的导航栏和底部栏

@interface GooglePlusManager() <GIDSignInDelegate,GIDSignInUIDelegate> @property (nonatomic, strong) GIDSignIn *gppSignIn; @property (nonatomic, weak) UIViewController * localVC; @end @implementation TWNGooglePlusManager (void)doGooglePlusLogin: (UIViewController *)viewController { [self setPropertiesToInitialState]; NSString* clientId = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"GoogleClientId"]; self.gppSignIn = [GIDSignIn sharedInstance]; [self.gppSignIn setClientID:clientId]; if (self.gppSignIn) { self.gppSignIn.scopes = @[ @"profile", @"email" ]; [self.gppSignIn setDelegate:self]; self.localVC = viewController; [self.gppSignIn setUiDelegate:self]; self.gppSignIn.allowsSignInWithWebView = YES; […]

显示密码/ Pincode启动应用程序 – 故事板

我试图启动应用程序时显示密码/ pincode(模式视图控制器)。 您可能会看到AppDelegate.h中的代码: – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { if (![[NSUserDefaults standardUserDefaults] boolForKey:@"passcode_in"]) { //display passcode screen UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"PasscodeViewController"]; [vc setModalPresentationStyle:UIModalPresentationFullScreen]; [self presentModalViewController:vc animated:NO]; } else { NSLog(@"No Passcode Screen"); } return YES; } 问题是,AppDelegate不支持显示模式视图控制器(presentModalViewController)。 我不打算使用.xib文件,只有Storyboard为我的应用程序。 有人知道它有什么问题吗? 任何build议表示赞赏。 解决 我遵循给我的以前发布的问题之一的指示https://stackoverflow.com/a/10303870/1344459我解决了这个问题,只添加一些代码到AppDelegate.m中的两个方法applicationDidEnterBackground和applicationWillTerminate PinCodeViewController(模态)启动应用程序。 现在它工作得如此顺利。

使用FB SDK v3.5在“允许这些应用程序使用您的帐户”列表中不显示iOS应用程序

我为我的应用程序使用FB ios SDK v3.5。 对于login部分,我不使用FBLoginView来login,而是使用UIButton并在该UIButton的处理程序中调用[FBSession openActiveSessionWithReadPermission]。 在FB SDK v3.2.1中,我使用下面的代码来处理不同的login情况,它工作正常: self.useAccountAllowed = true; ACAccountStore *accountStore; ACAccountType *accountTypeFB; if ((accountStore = [[ACAccountStore alloc] init]) && (accountTypeFB = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook] ) ){ NSArray *fbAccounts = [accountStore accountsWithAccountType:accountTypeFB]; id account; if (!fbAccounts) { //do not log into FB on the device } else if ([fbAccounts count] == 0) { […]

Facebooklogin – 获取用户数据

我正在使用Parse在iOS上构build一个应用程序作为后端。 为此,我使用Parse Facebook SDK,以便首先将Facebook链接到我的Parse用户,然后查询他的数据并保存它们。 问题是:有时我没有得到一些像电子邮件(用户数据[@“电子邮件”是零),名字,名称,或个人资料图片不会下载的一些信息。 不是所有的时间(实际上很less见),也不可能可靠地复制这个问题,所以我可以解决这个问题。 往往只有一个缺less的领域不是全部。 所以我在我的数据库中发现了漏洞(当用户的电子邮件地址是我的主要关注点时,并不酷) 这是我写我的方法(我编辑了大部分的if(错误)pipe理,使其更短)。 有任何想法吗 ? 感谢你们 ! NSArray *permissionsArray = @[@"public_profile",@"email", @"user_friends"]; [PFFacebookUtils initializeFacebook]; // Login PFUser using Facebook [PFFacebookUtils logInWithPermissions:permissionsArray block:^(PFUser *user, NSError *error) { if (user.isNew) { NSLog(@"User with facebook signed up and logged in!"); [self fbData:self]; } else { NSLog(@"User with facebook logged in!"); [self fbDataAlreadyLog:self]; […]