Hi i am trying to integrate google+ login on my iOS app. I've followed the instructions form this link.
The examples are working fine but when i tried to implement on my app it is getting this
errorTerminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSBundle gpp_registerFonts]: unrecognized selector sent to class 0x16af620'
I have added the following frameworks Image Any help
Code: in viewdidload of my view
GPPSignIn *signIn = [GPPSignIn sharedInstance];
signIn.shouldFetchGooglePlusUser = YES;
signIn.shouldFetchGoogleUserEmail = YES; // Uncomment to get the user's email
// You previously set kClientId in the "Initialize the Google+ client" step
signIn.clientID = kClientId;
signIn.scopes = [NSArray arrayWithObjects:
kGTLAuthScopePlusLogin, // defined in GTLPlusConstants.h
nil];
// Optional: declare signIn.actions, see "app activities"
signIn.delegate = self;
After that I add this functions
- (BOOL)application: (UIApplication *)application openURL: (NSURL *)url sourceApplication: (NSString *)sourceApplication annotation: (id)annotation
{
return [GPPURLHandler handleURL:url
sourceApplication:sourceApplication
annotation:annotation];
}
- (void)finishedWithAuth: (GTMOAuth2Authentication *)auth
error: (NSError *) error
{
NSLog(@"Received error %@ and auth object %@",error, auth);
}
And i add a button in my view of class GPPSignInButton.
I think you are using custom button with IBOutlet connection. Delete outlet connection in Storyboard and try again. It will work.
in the app delegate u need to set client id and once u hav set this you dont need to set it again in ViewController
did u added
GooglePlus.bundle
if not added add it to your projectnext in your myView u can do something like this
Hi the problem is with the -ObjC. Though i ve added the -ObjC earlier but i dnt know why it was not working but when i delete and again add it starts working. Maybe i copy-paste it earlier so there is any space or something.