Linking FB SDK 3.1.1 into project - Duplicate symbols error?

I just started using Corona Enterprise, so hopefully somebody can shed some light as to what’s going on here. I have the FacebookSDK 3.1.1 installed and working fine (tested a couple of their sample projects). Corona Enterprise is also installed and running fine – tested the CoronaSampleProject and my own project too.

However, as soon as I link in the FacebookSDK.framework in the Build Phases -> Link Binary with Libraries, along with the Accounts.framework, AdSupport.framework, and Social.framework, it’s throwing me an “Apple Mach-O Linker Error” - 27 duplicate symbols for architecture armv7. Every one of those, a symbol in the FacebookSDK is conflicting with a duplicate symbol in /Libraries/Corona/libplayer.a

Can anybody help me out? Again, the projects run just fine as soon as I remove the FacebookSDK.framework (and the other three), but once I add it to that list (not even writing any code for it yet), it throws out that error. Thanks! [import]uid: 87279 topic_id: 33437 reply_id: 333437[/import]

Basically Corona already includes a version of the FB sdk, so it conflicts with the newer version you’re trying to add.

I recommend using the Parse.com SDK to get around this problem. They provide a prefixed version of the Facebook API, so you use methods like PF_FBNativeDialogs instead of FBNativeDialogs and it works perfectly alongside the existing Corona libraries. You don’t need to sign up for any of Parse’s paid services to do this. [import]uid: 135827 topic_id: 33437 reply_id: 132830[/import]

Thanks for the quick reply! I figured that was the problem (two versions of the same thing), but I thought it was a problem with the way I was linking it or something. It didn’t occur to me that Corona would straight up not work with the Facebook SDK. I’ll start looking into your solution now though. Thanks again! [import]uid: 87279 topic_id: 33437 reply_id: 132831[/import]

On closer look, I don’t think Parse.com is going to work for us, I didn’t realize it was subscription based, and that isn’t really an ideal solution to the problem for us. There has to be some way to include the official Facebook SDK into Enterprise, and if there’s not, it’s something that should probably remedied by the Corona team, as I imagine many people who want to use Enterprise want to do so with Facebook in mind. [import]uid: 87279 topic_id: 33437 reply_id: 132937[/import]

Basically Corona already includes a version of the FB sdk, so it conflicts with the newer version you’re trying to add.

I recommend using the Parse.com SDK to get around this problem. They provide a prefixed version of the Facebook API, so you use methods like PF_FBNativeDialogs instead of FBNativeDialogs and it works perfectly alongside the existing Corona libraries. You don’t need to sign up for any of Parse’s paid services to do this. [import]uid: 135827 topic_id: 33437 reply_id: 132830[/import]

Thanks for the quick reply! I figured that was the problem (two versions of the same thing), but I thought it was a problem with the way I was linking it or something. It didn’t occur to me that Corona would straight up not work with the Facebook SDK. I’ll start looking into your solution now though. Thanks again! [import]uid: 87279 topic_id: 33437 reply_id: 132831[/import]

On closer look, I don’t think Parse.com is going to work for us, I didn’t realize it was subscription based, and that isn’t really an ideal solution to the problem for us. There has to be some way to include the official Facebook SDK into Enterprise, and if there’s not, it’s something that should probably remedied by the Corona team, as I imagine many people who want to use Enterprise want to do so with Facebook in mind. [import]uid: 87279 topic_id: 33437 reply_id: 132937[/import]

For iOS, we plan on moving our Facebook implementation to a static library that it’s decoupled.

That way, you can choose whether to link or not link against our implementation — if you do not link then, of course, our facebook Lua library would not be available, but here you’d be able to link against whatever version of the Facebook library you want. Then, you can roll your own implementation. [import]uid: 26 topic_id: 33437 reply_id: 133634[/import]

For iOS, we plan on moving our Facebook implementation to a static library that it’s decoupled.

That way, you can choose whether to link or not link against our implementation — if you do not link then, of course, our facebook Lua library would not be available, but here you’d be able to link against whatever version of the Facebook library you want. Then, you can roll your own implementation. [import]uid: 26 topic_id: 33437 reply_id: 133634[/import]