Facebook sdk framework not found ios7, xcode5 - objective-c

I am new to Facebook SDK with iOS. I want to send invitation to friends on Facebook for using my app for this I am using Facebook (developer.facebook.com)sdk api I have registered my app installed sdk and imported framework. After importing got error as,
ld: warning: directory not found for option '-
F/Users/vijaywebsolutions/Documents/FacebookSDK'
ld: framework not found FacebookSDKkk
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Why don't you try CocoaPods for your projects its the dependency manager for Objective-C projects.
Refer CocoaPods
Simple Setup
Open Terminal and type sudo gem install cocoapods
Once installed you need to create a simple Pod file in your project directory and add the dependency to that file example.
Go to your project root directory and create Pod File by typing in terminal touch Podfile
Once created add the following line to the podfile.
platform :ios
pod 'Facebook-iOS-SDK', '~> 3.11.0'
Save the file and then in the terminal(where pod file exist) run pod install
Now it will install the requested dependencies and will create a Workspace for your project, you don't need to take any effort to configure it.
Its the best way to manage your dependencies. Give it a try you won't regret.

First you have to include facebook sdk in you project, steps as follows :
click on your project folder in xcode.
go to general tab and find Linked framework and libraries.
in that click on + sign and provide path to FacebookSDK.framework
These steps will facebook sdk in your project.
Then you have to import it in any of .m file where you want to use is it. like following line :
#import <FacebookSDK/FacebookSDK.h>

I also ran into similar error when integrating FacebookSDK into my app. I have added the framework in the Link Binary with Libraries, however, error persisted. One important thing to note when app is built, is it should be build against source Facebook iOS SDK and NOT binary SDK. I got latest source from here Facebook iOS SDK, downloaded Bolts-iOS and XCTOOL and then ran build_framework.sh Once completed, copied FacebookSDK.framework to my app and everything worked perfect.

Related

Undefined symbol: _OBJC_CLASS_$_RCTConvert react-native-payments

I just Added the Package react-native-payments IOS Build is not working
I tried to add Payment package and running into this issue IOS build is not working
It looks like your Package is not linked to your pods. With the pod config of my project, I manually added in the path within my podfile, as well as added the library to xcode. Go into the build settings of the react-native-payments pod, and change the ios deployment to what will work with your project (for me that was from ios 7 to ios 11). Next add $(SRCROOT)/../../React and $(SRCROOT)/../../react-native/React to the Header search paths of your target (accessible from Project Name > Targets > Build settings >Search Paths).

Init IOS project with pods using react-native init command

Is there any way to create the IOS project with pods using react-native init command?
Currently there is different installation instruction for react native libraries.
Example: Some of them install using react-native link command while other requires to setup using cocoapods. Missing both will leads to lots of compilation errors.
Could anyone suggest what is best way to create project using react-native.
Thanks
On the official react native documentation, there are 2 ways to start up your project, which is using 'CRNA' or 'Build With Native Code'.
For CRNA, it is the fastest and easiest way to start up your project.
It really easy to run your React Native app on a physical device without setting up a development environment. If you want to run your app on the iOS Simulator or an Android Virtual Device, please refer to the instructions for building projects with native code to learn how to install Xcode and set up your Android development environment.
The react native link is used if you want to link your library through the terminal. But in some cases, there are several problem occurred related to library compatibility. I rather suggest use pods or manually link your library through XCode.
Pods is a dependency manager for native code that we use on our native code project. It will automatically generate and link the library.
If you want to have pods on your ios project. After you install cocoapods, you could follow these steps :
1. Open terminal and direct to your project (cd YOUR_PROJECT/ios
2. pod init
3. And then Podfile will be generated within the ios project.
And from now on, you should use YOUR_PROJECT.xcworkspace if you want to manage the project. Thats because Pods should be placed and included same with your project but '.xcodeproj' does not include your Pods.

xCode 7.1: Could not build Objective-C module 'GoogleMaps'

I am using the GoogleMaps iOS SDK in my app and added it with cocoapods. However, after updating xCode from 7.0 to 7.1 I'm suddenly getting the following error: Could not build Objective-C module 'GoogleMaps'
In addition xCode also gives me an error in the GoogleMaps.h file in the GoogleMaps.framework:
Include of non-modular header inside framework module 'GoogleMaps'
I already deleted my DerivedData folder, updated cocoapods, reinstalled the GoogleMaps iOS SDK and cleaned and build the framework's scheme and my app's scheme. But nothing helped so far.
Answered in this similar question: xCode 7 error: include of non-modular header inside framework module with Google Maps
...but essentially you'll need to create an Objective-C bridging header file whereas you may not have needed one with Xcode 7.0. The why still eludes me.
you should open the .xcworkspace not .xcodeproj
once you added cocoa pods your project folder will contain the .xcworkspace file

cocoa-pods failed to install pods for braintree framework in my app

I'm working on project in which I need to install braintree,
actually braintree was integrate and work fine but yesterday, it failed to compile with my project.
I am integrating Braintree SDK via Cocoa-pods and always open workspace instead of opening project file.
In start, it shows me issue regarding missing of library "-lPods-myProject-braintree"
then I delete cocoa-pods (uninstall it) again install it and repeat the whole cycle of integrating braintree SDKs via Pods but now it showing me issue,
First Time I also get this type of errors but finally it solved by one line.
please run following commands in Terminal
go to your project folder.
Be sure you have installed cocoapods in your system.
create pod file with command - nano podfile
write pod 'Braintree' in your podfile.
save podfile and run command pod install
If you get failed to install pod.
then run command pod try Braintree
You will surely get your pod installed in your project with xcodeworkspace file.

Facebook linking issues with iOS project

I guess I'm not linking the Facebook SDK properly with my project. Here's the error I get:
clang: error: no such file or directory: '/Users/username/Library/Developer/Xcode/DerivedData/Whatto-fotukpkslfnxvzbjmykxitdwkyds/Build/Products/Debug-iphonesimulator/libfacebook_ios_sdk.a'
This is an ARC iOS project. Any help would be great.
fyi: the Facebook libfacebook_ios_sdk.a library is red in the Build Phases/Link Binary With Libraries area under Project targets.
thanks
I would suggest dragging and dropping the library in the Project Navigator, then doing a clean followed by a build.
It sounds like you've added the facebook-ios-sdk Xcode project into your project... try just importing the contents of the FBConnect group. No need to include the project files.