React native facebook login in ios undefined symbols for architechture x864 - ios

I'm trying to add facebook login on react native latest version 0.49 by follow this tutorial
https://github.com/facebook/react-native-fbsdk
I did step by step and see some videos on youtube and did exactly but I still get the same 28 errors
I guess maybe it's because in the link Binary with Libraries I can't see the FBSDK, even I added it as explained on tutorial to Frameworks folder
I saw some posts in stack overflow e.g
React Native iOS build failed : Undefined symbols for architecture x86_64
but without any help.
thanks.

There is an issue with XCode 9, where when you drag and drop any files, it does not get added to the target.
You need to manually add them to your target in File inspector now.
This can happen not only with frameworks but other files as well. To prevent this issue, whenever you want to add any file or resource to your XCode project, you should first add that file/resource to the project folder and then right-click and then add to your XCode project using Add Files to ..

Related

Universal linking iOS - where is the .xcodeproj file?

I've been trying for days to get Universal Linking working on iOS for React Native.
The docs here say "On iOS, you'll need to link RCTLinking to your project". I'm then told to go to node_modules/react-native/Libraries/LinkingIOS and drag a .xcodeproj file into my project.
None of the libraries in the Libraries folder whatsoever have any .xodeproj files in them.
Is there meant to be? Is my react-native instance missing something? Googling this issue pulls up nothing at all - does everyone else have .xcodeproj files in their Libraries folder??
Starting with version 0.60 React Native provides auto-linking.
To have the library available in RN versions newer than 0.60 you have to:
1) Add reference to LinkingIOS folder into header search paths
in
Xcode -> project target -> projectName ->Build Settings -> header search paths:
$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS
2) Import it in AppDelegate.m
#import "RCTLinkingManager.h"
About the other steps that you need to do:
upload an apple app site association file to your web server,
preparing the app for universal linking in developer.apple.com and
setting up universal links in Xcode and RN code
you can check this link:
https://www.ekreative.com/blog/universal-linking-in-react-native-for-ios/
Just ignore the manual linking paragraph on that page.

ld: framework not found MCCMerchant_sandbox

I am trying to integrate Master card merchant SDK. I am following all steps as described but always fails with error framework not found.
https://developer.mastercard.com/page/masterpass-merchant-sdk-for-ios#
Below is the screen shot of my framework search path
Below is the error which I am getting when trying to add framework in Xcode project
First of all You need to be sure that framework included in linked libraries. Go to project settings and check it is listed in Link binary With Libraries section.

Error with Google Play Game Service on iOS

I am getting this error:
ERROR: GPGSAppController.mm GIDSignIn.h File not found error
I am using Google Play Game Service plugin for Unity for leaderboard and Achievements, and every thing is working fine in android but when I build to IOS and try to run my project to an iOS device I keep getting this error and I couldn't find a solution to it for hours now.
I tried to deleted everything related to Google Play service (After creating a back up of course) and the app installed and worked ok, except it was a bit laggy but that is a another issue. So I'm sure the problem comes from Google Play Service, but I have no clue how to fix it. Again I'm new to Xcode and iOS development in general and even Mac.
I also get this message after building the project in Unity:
TO FINISH CONFIGURING THE EXPORTED XCODE PROJECT
Add these frameworks:
AddressBook.framework
AssetsLibrary.framework
CoreData.framework
CoreTelephony.framework
CoreText.framework
Security.framework
libc++.dylib
libz.dylib
Add the following bundles and frameworks from the Google Plus
and the Google Play Games C++ SDKs. These can be downloaded from
https://developers.google.com/games/services.
GoogleOpenSource.framework
GoogleSignId.bundle
GoogleSignId.framework
gpg.bundle
gpg.framework
Note: Make sure the bundles are copied to application. This can be
verified under Build Phases/Copy Bundle Resources.
Add the '-ObjC' linker flag. To do this, select the top-level project
object, select the 'Unity-iPhone' build target, then go to the
Build Settings tab. Search for Other Linker Flags and add
the '-ObjC' flag to that list.
** Note: To run in the simulator, use Unity 4.6.8 or greater.
ios_instructions on plugin repository
But I have no idea how to do any thing above as am not familiar with iOS development. Any help is appreciated.
#aimozs answer was right for indicating where to add required files, a few google search gave me the answers;
From instructions (didn't work for me, scroll down)
AddressBook.framework
AssetsLibrary.framework
CoreData.framework
CoreTelephony.framework
CoreText.framework
Security.framework
libc++.dylib
libz.dylib
These can all be located directly when linking frameworks. (In my case, libc++.dylib and libz.dylib were already linked, and I couldn't find them somehow, but regenerating your xcode project should add these two again.
GoogleOpenSource.framework
I've found it here:
https://developers.google.com/+/mobile/ios/getting-started#step_1_creating_the_console_name_project
GoogleSignId.bundle
GoogleSignId.framework
Found them in:
https://developers.google.com/identity/sign-in/ios/sdk/
(I grabbed latest version Google Sign-In SDK 3.0.0)
gpg.bundle
gpg.framework
I found them here:
https://developers.google.com/games/services/downloads/sdks
(Grabbed Play Games C++ SDK Version 2.1)
Also, the following part of the message seemed important:
Make sure the bundles are copied to application
I tried to copy bundle files to root of the project, but I still get the same error.
Solution: CocoaPods and the podfile!
I saw the PodFile in xcode project directory!.
Here you go; make sure you followed these steps:
https://github.com/playgameservices/play-games-plugin-for-unity#ios-setup
Then see https://cocoapods.org/
sudo gem install cocoapods
pod repo update
pod install
open Unity-iPhone.xcworkspace
Way better than manually copying files everywhere! ;)
Note: I also had to disable bitecode because I was having a linker error concerning GoogleOpenSource:
You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE)
It doesn't seem to be compiled with bitcode enabled, solution in here: how to ENABLE_BITCODE in xcode 7?
Build, enjoy and focus on making awesome games!
Linked questions
There's also a small discussion here:
http://forum.unity3d.com/threads/googleplus-googleplus-h-file-not-found-gpgsappcontroller-mm-xcode.294398/
A similar issue on UnityAnswers:
http://answers.unity3d.com/questions/1098655/gpgsappcontrollermm-gidsigninh-file-not-found-erro.html
Im going through that aswell, and for #1 it has to be done in xcode, here's a screenshot of how to add those libs
And that is for #3
Hope that helps :) and I'll get back to you about #2 when I've found out about it ;)

Unable to use Google Analytics for iOS

I don't know what Happens to the code or google.
I just Downloaded the Sample App for Google Analytics for Google.
I downloaded it via pod using:
pod try Google
and chooses the option for Analytics.
After downloading when I build the project I am getting Linker Error.
Fully Stuck Tried All The way available in SO.
Removed -ObjC Flag
Removed -force-load Flag
Changed Load Common Section from Yes to NO
But none of the way help me Out. What is the issue with it.
Here is the Screen shot of the Error:
Here is the Following reason of this ERROR :
*Note - Integrated GooGle Analytic without CocoaPods.
If latest GA(Google Analytics) sdk is using then better to upgrade to Xcode 7 otherwise it will give you duplicate error (even if configured properly)
Running with Xcode 6.2 or < Xcode 7 then better to download September (August) Release Sdk.
Go with Xcode and select GA folder and right click - choose show in Finder then all files should be there . If yes then check is there two different copy exists in other folder .
Thanks
It basically says that there are functions duplications in the project...
Make sure the following:
The project does not have #import for .m files by mistake
In the projects build phases there are no file names duplications
There are no initialized variables in .h files e.g "int
variableA = 5"
If none of the above works, remove in project settings Other Linker
Flags "-ObjC", that will allow to load the same functions more then
one time.

Undefined symbols for architecture i386 linking facebook sdk

I am trying to link the facebook library to my app but i am getting this very strange error:
what does this mean? I got this to work on another app, the files and code are the same...
The error you are seeing is from the linker. When you compile your code, the compiler can find declarations for all the functions that you need, because you're including the facebook header (facebook.h). But when it comes time to link your program, the linker tries and fails to find compiled versions of those facebook methods. You need to bring the facebook SDK into your project and link against it.
The way I'm going to recommend linking against the Facebook SDK is actually one I haven't tried before, but it looks like the simplest way to get your project building:
Download and install the FacebookSDK framework from here.
Drag the FacebookSDK.framework bundle, which will end up in ~/Documents/FacebookSDK into your Xcode project.
When given the option, choose not to "Copy items into destination group's folder" and make sure that your application target is selected in the "Add to targets" section.
You may have to change your current #import/#include lines. To see the facebook methods from the framework you just imported, you should import like:
#import <FacebookSDK/FacebookSDK.h>

Resources