Parse and Facebook SDK "Bolts" Framework error

15,802

Solution 1

Well I found it. The problem was that old files (which were now deleted) were being referenced in the "Library Search Paths Flag". Thanks to this post for giving me the idea. All I had to do was delete the old paths and it now works again.

EDIT: It appears that for some situations the order of the search paths matters as well (see below).

Solution 2

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

Solution 3

That worked for me Temporary workaround for Parse 1.6.4 and Facebook SDK 3.23

Add to your AppDelegate.m or another class following constant after imports and before implementation section: NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsException";

The explanation of the bug https://stackoverflow.com/a/29136507/1345244

One hack I found for working around missing symbols, was just redefining the missing symbol again in my code.

The BFTaskMultipleExceptionsException string is defined here like this:

NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsException"; So maybe just try putting that one line into your code?

From the history on github, it looks like this was just added to Bolts about 19 days ago. Version 1.1.4 of Bolts was released 14 days ago (1.1.3 was from October last year). So it probably is caused by the version mismatch of Bolts that you noticed.

Another option might be to get an older version of Parse from before Bolts 1.1.4 was released.

Presumably this will be fixed once a new Facebook SDK is available with Bolts 1.1.4.

Solution 4

same problem here.

I had both frameworks included with no problem, until I added SponsorPay SDK which needs to add the -ObjC in "Other Linker Flags" on target "Build Settings".

So, in my experience this issue only happens when the flag -ObjC is present.

I tried all the solutions exposed in here but nothing worked for me, I hope anyone can bring more light on how to solve this issue even with the -ObjC flag active.

EDIT:

There's a question related to this, I'll put the link here in case is helpful to someone: Contradicting frameworks on -ObjC

Share:
15,802

Related videos on Youtube

mginn
Author by

mginn

Updated on September 15, 2022

Comments

  • mginn
    mginn over 1 year

    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?

  • stone
    stone about 9 years
    So are you using parse 1.6.4 and facebookSDK without Cacoa Pods? nothing is working for me. Still getting linking errors. There is nothing in my Library Search Paths
  • stone
    stone about 9 years
    I got the same as above, but fixed now. see my answer below
  • Laurent Meyer
    Laurent Meyer almost 7 years
    Yep saved my night :+1: