Duplicate Symbol SBJSON on iOS Facebook SDK V 3.0 - ios

In the current project, I used SBJSON everywhere and got it working fine with the previous version of iOS Facebook SDK since SBJSON was included in Facebook SDK.
I just upgraded to iOS Facebook SDK version 3.0 and having problem with SBJSON.
The first thing it complaint was about NOT finding SBJSON header file. So I thought, I could manually include the SBJSON lib into the project.
After I did that, then the compiler complaint that the SBJSON symbol was duplicated with the Facebook SDK.
I could not find the SBJSON.h anywhere in FB SDK headers.
So at the end, I went into a loop of problems.
Does anyone know how to solve this issue?
The worst case could be that I have to switch to use other JSON library for iOS.
Note: They are using framework for Facebook SDK, not the source code library like before
Cheers

What I ended up using to solve this are two approaches:
The first one
Firstly, not using the pre-built Facebook SDK framework that they
provided
Secondly, check out the Facebook SDK source code from Facebook SDK and integrate it to the project
The second one
Integrate the Json-framework using their source code here and change the name of any duplicate class to something unique to your project like SBJsonParser to MySBJsonParser

Related

Facebook sdk and Bolts framework (duplicate symbols)

I added Parse 1.10 with Bolts ,when I build an error FacebookSDK.h not found occurs , If I add FacebookSDK framework this occurs.
duplicate symbol _OBJC_IVAR_$_BFAppLinkTarget._URL in
87 duplicate symbols for architecture i386
If I remove facebookSDK one of Parse header file says FacebookSDK.h not found
and
If I remove Bolts framework one of Parse header file says Bolts.h not found
I downloaded latest FacebookSDK but It does not have FacebookSDK.framework , It contains FBSDKLogin,FBSDKMessengerShareKit and so on...
So I used FacebookSDK.Framework from an old project.
I'm Stuck , Plz Help.
Thanks
Facebook v4.8 SDK does not have facebooksdk.framework.
If you are using the latest version of Parse then,i would recommend using the latest version of facebook sdk too.
Follow this links for making sure that you are integrating it properly.
Facebook getting started
Parse FB integration
For basic login and graph api request from Facebook and linking it to Parse.You need to include FBSDKCoreKit.framework,FBSDKLoginKit.framework,FBSDKShareKit.framework,Parse.framework
I hope that,it helps!

iOS app - Non-Public API usage- app references non-public selectors: cancelButtonClicked, setResult:

After I have uploaded app to itunes i get mail saying that my app using non public api methods- cancelButtonClicked, setResult:
But cancelButtonClicked is used as IBAction method for various buttons and searchBar. Do I need to rename it? Also, this is very common please suggest..
For setResult: Method I have not used this method any where also, I haven't found this method used in my complete workspace.
I have used multiple third party APIs some of them are below:
AFNetworking
Google Maps SDK
Google Places SDK
Google Analytics
RSK Image Cropper
Facebook SDK
Twitter SDK
ASIHTTP
MBProgressHud
Reachability
SDWebImageCache
Please suggest what I can do.
Also, I am using Xcode 6.3.2 with deployment target iOS 8.0. In some SO's answers it was suggested to use Xcode 6.0.1 but I can't use it as Google Maps SDK POD suggested to use Xcode6.3 or later.
Any help appreciated.
You should make a search in your project directory for the method's call that you mentioned. This is a command line script to search in the whole project. This will return where these methods are called, and then you should modify the name of the method or update the library/framework containing the call.
grep -Rnis 'cancelButtonClicked' *
grep -Rnis 'setResult:' *

How can I found facebookSDK.framework on facebookSDK v4.0.1?

So I've downloaded facebookSDK pkg, and I already installed it to on my document folder. But I can't find facebookSDK.framework inside the folder, I need it for my iOS project. Where I can find it?
Pretty sure the framework you are after is FBSDKCoreKit.framework. If you are manually adding the framework this is found in the folder you have installed in your documents folder. This includes the ability to see:
- Sharing
- Login with Facebook
- App Events
- Graph API calls
Information found on https://developers.facebook.com/docs/ios/getting-started
If you are working on an old app which is using FacebookSDK previous framework then you need to download that old version like 3.XX but if you are developing a new app and integrating new Facebook then you need to use FBSDKCoreKit.framework that is in v4.0.1
Some functions in never version are modified.
For details study the Facebook documentation
The above two answers are correct. Refer these if you want more clarification
First One
Second One

Facebook SDK on Unity 5 on iOS

I have been having trouble getting the latest Facebook SDK 6.2.1 to function with Unity 5.0.0f4 in both my project and an empty one.
Here is what I do:-
Create a blank project
import Facebook SDK
Set App ID and Name in editor settings
Add sample scene to build settings
Build Xcode Project
Open in Xcode
Disable ARC in settings
Remove extra #endif when xcode complains about it
Build and Run game on iOS device
The error I end up with is in the following link:-
dl.dropboxusercontent.com/u/13490919/FacebookiOSProb/Screenshot%202015-03-12%2014.53.29.png
The error I get is "EXC_BAD_ACCESS (code=1)". I'm not much of an xcode/iOS guy so this confuses me a tone load. This error does not occur if facebook isn't present. Has anyone got any idea how to get around this? Surely i'm not the only one with this issue. All I want to do is get an access token from facebook. If need be, I don't mind using a simple webview or something similar.
Any help on this would be much appreciated. I would give free hugs to but ya know.
Thanks
Ive managed to solve the issue. As posted by someone else on unity forums here, you need to mark the option "iOS" as platform for plugin and adding "-fno-objc-arc" as compile flag in the following file: Assets/Facebook/Editor/iOS/FbUnityInterface.mm
This works with the latest versions of Unity 5.0.1f and Facebook SDK 6.2.1 as of this post.
Facebook SDK for Unity Downloads
Note: Only Unity 4 is supported at this time
That is why it's not working. I don't know when Facebook will launch their sdk for Unity 5.

How to properly use Bolts Framework code along with Parse and Facebook?

So,
I am building this iOS 8 app where I am using both Facebook and Parse Frameworks simultaneously. I am aware that Bolts framework is included in the latest Facebook SDK. I am attempting to use BFTasks with Parse code to make it easier to handle async taks, such as the following:
PFQuery *userQuery = [PFUser query];
[[userQuery findObjectsInBackground] continueWithSuccessBlock:^id(BFTask *task){
}];
However, including the Facebook and Parse SDKs alone won't let me access the code above via Xcode auto completion. It will even crash if I attempt to run something like the above.
On the other hand, if I try to include the Bolts Framework into the project and import the headers #import <Bolts/Bolts.h>, it will let me access the methods via auto-completion, but Xcode will complain saying that the there are duplicate binaries of the Bolts Framework.
Can anyone explain how to go about this or send me a link on a tutorial or something? I might be overlooking something simple.
Thanks a lot in advance
I was able to get it going using cocoapods. So I installed bolts using cocoapods and then manually added the Parse and Facebook SDK.
I couldn't figure out how to do it otherwise
I was having a problem with linker errors after upgrading to Parse SDK 1.9 -- references included BFTask and multiple references. Also using FB SDK 3.24 and one version using 4.7. Same problem. No cocoapods. I finally resolved it by importing both FB SDK and Bolts from the FB default location -- with no copy files provision AND importing JUST Parse and ParseFacebookUtils frameworks (not their Bolts framework) with the copy files to destination = YES. So - it appears - XCode should access Bolts from the FB SDK location when needed, but NOT see the Parse Bolts framework because Parse has been copied to the app's folder, but the Parse Bolts was not. So no double reference to Bolts. See if this helps.

Resources