Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parse and Facebook SDK "Bolts" Framework error

I have an app with both the Parse and Facebook frameworks installed. Parse was installed by dragging the files to the "Frameworks" folder of the project and selecting "copy if needed", while the Facebook SDK was installed by dragging and not selecting the copy option. Both appear under the Linked Binaries list. The problem appears to be that Bolts is included in both SDKs. I tried just using the Facebook one, producing the following Link-O errors:

Undefined symbols for architecture x86_64:
  "_BFTaskMultipleExceptionsException", referenced from:
      ___53+[PFObject(Private) deleteAllAsync:withSessionToken:]_block_invoke214 in Parse(PFObject.o)
      ___65+[PFObject(Private) _deepSaveAsync:withCurrentUser:sessionToken:]_block_invoke311 in Parse(PFObject.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I deleted the link to the Facebook one and tried dragging the Parse one, but the error persisted. I also got the warning that

ld: warning: ignoring file /Users/milesper/Documents/FacebookSDK/Bolts.framework/Bolts, missing required architecture x86_64 in file /Users/milesper/Documents/FacebookSDK/Bolts.framework/Bolts (2 slices)

even though I had deleted the file from the Facebook SDK.

How should I clean up the project and link to the Parse version of Bolts? Is there something else i should be doing?

like image 844
mginn Avatar asked Mar 07 '15 22:03

mginn


1 Answers

Turns out the order in which you include/search the frameworks in your project matters.

Here is what I did to work with Parse 1.6.4 and FacebookSDK without CacoaPods

  1. Use the latest version of Bolts. (1.1.4)
  2. Your include paths should be ordered to find Bolt first, then FacebookSDK, then Parse

Ordering your search paths

like image 74
stone Avatar answered Nov 16 '22 02:11

stone