Integrating Google Plus in iOS application - ios

I'm trying to integrate Google Plus authentication, and have followed a tutorial in this link.
When I add #import "GPPSignIn.h" I get the error :
GPPSignIn.h not found.
However, when I use #import "/Users/MH/Documents/TestGooglePlus/GooglePlus.framework/Headers/GPPSignIn.h" it works.
After compilation my application crash and I have this message:
-[__NSDictionaryM gtm_httpArgumentsString]: unrecognized selector sent to instance 0x7fc71b568010

It sounds like you have two problems.
First, the header.
See: https://developers.google.com/+/mobile/ios/sign-in#enable_sign_in
#import <GooglePlus/GooglePlus.h>
#import <GoogleOpenSource/GoogleOpenSource.h>
Second, you're missing an important linker flag.
See: https://developers.google.com/+/mobile/ios/getting-started#step_2_initialize_the_google_client
Step 6.2:
Add the ObjC linker flag to the app target's build settings:
Other Linker Flags: -ObjC

Related

How to Fix Unity IOS Facebook Error on App Launch

I am integrating Facebook Login & Sharing into a game for IOS using Unity. But as soon as app launches i am getting this error
-> applicationWillResignActive()
2019-03-11 16:39:07.405809+0500[828:197716] +[NSError fbErrorWithCode:userInfo:message:underlyingError:]: unrecognized selector sent to class 0x1d2710f80
2019-03-11 16:39:07.466234+0500 [828:197716] Uncaught exception: NSInvalidArgumentException: +[NSError fbErrorWithCode:userInfo:message:underlyingError:]: unrecognized selector sent to class 0x1d2710f80
Actually I got almost same error codes in my project on Swift. So is not problem Unity, is problem connection Facebook SDK to project.
In my case, this error happened, when I try use VPN application Luna. Is seem have conflict VPN with Facebook SDK if is connected to project not correct. When VPN disabled, application and analytics worked without any problem.
For fix my problem, in "Project->Build Settings" need have parameter "Other Linker Flags" value "-ObjC".
Also I used bridge ".h" file for connect Facebook SDK to my Swift project. I had line "#import <FBSDKCoreKit/FBSDKCoreKit.h>", so I delete it from bridge. And manual added in every Swift class, what used Facebook SDK this line:
import FBSDKCoreKit
I did not have the "FBSDKCoreKit" parameter in "Other Linked Flags". Adding the package, then cleaning the build was a fix for me

Firebase runtime crash

I have added the Firebase SDK manually to my project (can't use cocoapods due to configuration issues).
Using the following frameworks:
FirebaseCore.framework
FirebaseInstanceID.framework
Firebasemessageing.framework
In the AppDelegate I have imported this following:
#import "Firebase.h
#import <FirebaseInstanceID/FirebaseInstanceID.h>
#import <FirebaseMessaging/FirebaseMessaging.h>
And then I reference the API:
[FIRApp configure];
All is fine when I build the project. However as soon as the app hits the Firebase SDK API - I am getting the following crash:
Error message in the console:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSData gtm_dataByGzippingData:error:]: unrecognized selector sent to class 0x10553f168'
I have added all the required frameworks I can think of, yet still getting this issue.
Make sure you've added the GoogleToolboxForMac library to your project and you've added -ObjC to Other Linker Options in Build Settings.

On Google plus integration in iOS app crashes

i am trying to implement google plus login but app crashes and get the following error
+[NSBundle gpp_registerFonts]: unrecognized selector sent to class 0x34ce2f0c
Ensure that uou have added -ObjC to Other Linker Flags in the build settings of your app.

Parse and Facebook SDK - unrecognized selector sent to class

I'm currently using the latest Facebook SDK, Parse SDK and Xcode.
The Parse SDK frameworks were copied to my project while the Facebook SDK frameworks were referenced. I'm using Bolts.framework that was provided by Facebook and I connected my Parse account with my Facebook App.
The problem is when I try to implement Inside my AppDelegate.m file (after the Parse setApplicationId of course):
[PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:launchOptions];
my app crashes with the following error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:]: unrecognized selector sent to class 0x102c060b0'
These are the header files I included:
#import <Parse/Parse.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
#import <ParseFacebookUtilsV4/PFFacebookUtils.h>
When I'm using the normal Facebook SDK alone it works fine - I can login using Facebook login button. When Parse comes into play with it's PFFacebookUtils class, I just had horrible experience. At first I couldn't even build the project because of linker errors which were fixed using this solution:
https://stackoverflow.com/a/18626232/3608136
I've tried every solution in Stackoverflow, but I can't figure it out. Here is how my "Search Paths" look:
$(inherited)
$(PROJECT_DIR)/parse-library-1
/Users/me/Documents/FacebookSDK
Everything related to Parse is in parse-library-1.
By the way, needless to say.. when I try to user other methods like logInInBackgroundWithReadPermissions it crashes.
You can try to add "-ObjC" flag to Other Linker Flags section in project settings.
Its happens to me with another framework and the solution was that!
I hope it helps!

Facebook and Parse integration unrecognized selector

I'm trying to integrate a Facebook login with my Parse backend. Upon running the app, I receive
[PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:]: unrecognized selector sent to class xxxxxx
on the line
PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(nil)
or
PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(launchOptions)
I have tried the solution here: https://developers.facebook.com/docs/ios/troubleshooting#unrecognizedselector
(adding the -ObjC flag), and have cleared Derived Data, to no avail.
I'm using Parse SDK 1.7.2, Facebook SDK 4.0.1, and the PFFacebookUtilesV4 framework.
The full error is as follows:
2015-05-03 14:22:25.742 hotPotato[49116:1453068] +[PFFacebookUtils
initializeFacebookWithApplicationLaunchOptions:]: unrecognized
selector sent to class 0x10f524048 2015-05-03 14:22:25.810
hotPotato[49116:1453068] *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '+[PFFacebookUtils
initializeFacebookWithApplicationLaunchOptions:]: unrecognized
selector sent to class 0x10f524048'
I faced same issue.
My mistake was that I also added ParseFacebookUtils.framework in the project.
Just remove it and everything will be fine :)
Make sure that you have imported the correct frameworks into your bridging header:
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <ParseFacebookUtilsV4/PFFacebookUtils.h>
Also check that the needed frameworks are included in the Linked Frameworks and Libraries list under your target's General tab.
If you've added the frameworks manually, go to the Build Settings tab, and make sure that Search Paths contains the paths to the Parse and Facebook frameworks.
Mine looks something like this:
$(inherited)
$(PROJECT_DIR)/Vendor/Facebook
$(PROJECT_DIR)/Vendor/Parse
The PFFacebookUtils initialization call in the application(application:, didFinishLaunchingWithOptions:) delegate method should follow the Parse initialization method:
Parse.setApplicationId("<APP_ID>", clientKey:"<CLIENT_KEY>")
PFFacebookUtils.initializeFacebookWithLaunchOptions(launchOptions)
If you haven't done this already, I suggest that you consult Parse's own guide:
https://parse.com/docs/ios_guide#fbusers-setup/iOS
My problem was solved by making all my frameworks including my Parse ones referenced instead of copied.
Probably a little late but I solved this by using the Bolts.framework from the Facebook SDK as opposed to the Parse SDK.

Resources