19

I downloaded the new iOS Parse API (1.6.4) and tried to build my project. When I do, I get this error:

Undefined symbols for architecture arm64" "_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 arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Screenshot: screenshot

mirap
  • 1,266
  • 12
  • 23
  • I also get following warning: "Auto-Linking supplied '(path)/Bolts.framework/Bolts', framework linker option at (path)/Bolts.framework/Bolts is not a dylib" – mirap Mar 06 '15 at 13:14
  • You say you downloaded the new version. Was your project working with an older version? – Leo Flaherty Mar 06 '15 at 13:33
  • 1
    Yes it was. Also when I remove new API and copy back old API (1.6.3), it works. – mirap Mar 06 '15 at 13:34
  • Do you have the Facebook SDK framework in the project as well? I'm having the same problem, just to clarify – Leo Flaherty Mar 06 '15 at 14:50
  • 1
    Looks like you forgot to add the Bolts.framework, can you double-check this? – Björn Kaiser Mar 06 '15 at 15:12
  • I can't speak for mirap, but my problem was originally caused by bolts.framework conflicting with facebooksdk.framework. Another question on the subject: http://stackoverflow.com/questions/25840546/facebooksdk-and-bolts-conflicting-each-other-duplicate-symbols-on-build – Leo Flaherty Mar 06 '15 at 15:33
  • I have Facebook SDK linked as well. But - I need Bolts framework for Local Datastore. I need to do this: [[query findObjectsInBackground] continueWithSuccessBlock:^id(BFTask *task) { ...... – mirap Mar 06 '15 at 16:28
  • I am having the sale problem. – jdmorgenstein Mar 06 '15 at 23:30
  • 2
    Ok, issue is already reported as bug here: https://developers.facebook.com/bugs/383331175179417/ Please follow. – mirap Mar 07 '15 at 14:45
  • I'm using Parse 1.6.5 and Facebook SDK 3.23.2, and I'm still getting the same error. Thoughts? – Matt Mar 24 '15 at 23:54
  • Yes, the bug is still there. – mirap Mar 25 '15 at 10:55
  • For future users -"Bolts.framework". you can get it inside parse latest SDK https://www.parse.com/docs/downloads – jeet.chanchawat Jul 10 '15 at 17:55

11 Answers11

12

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";

@interface IPAppDelegate ()
@end

@implementation IPAppDelegate

It should solve the problem until it'll be solved on Parse/Facebook side.

-- Update: This solution is only for Facebook and Parse SDK versions that listed above and these versions right now are outdated.

New Parse SDK 1.7.4 works correct with new Facebook SDK 4.0 and there shouldn't be such a problem.

ik1
  • 213
  • 3
  • 14
  • This makes error with 1 duplicate (and that's the one in AppDelegate). – mirap Mar 09 '15 at 19:11
  • Did you check frameworks versions? Did you installed additional Bolts framework or which comes not with Facebook SDK? – ik1 Mar 09 '15 at 21:43
  • I installed latest Bolts, not the one that comes in FacebookSDK. But - it seems that there's Bolts built directly in FacebookSDK. – mirap Mar 10 '15 at 11:50
  • Yes, that's correct, but the one which comes with Facebook SDK doesn't contain symbols which are already in the SDK. Could you try with it? – ik1 Mar 10 '15 at 18:23
  • Surkov Yes, that seems to be the problem. – mirap Mar 12 '15 at 10:53
  • There wouldn't be, because linker won't find it. The best solution would be to create an empty objective c file and the constant to it You need to make sure that your file is added to compile sources. – ik1 Mar 21 '15 at 08:17
  • 1
    This solution can take away the error but there're some side-effects. With this implemented in my app, I found this in my log when logging into the app: **-[BFTask isFaulted]: unrecognized selector sent to instance 0x18b00da0** and my app just goes freezed but no crashed. Is anyone know how to deal with this? – SanitLee Apr 09 '15 at 08:29
  • I'm having the same problem @SanitLee. Was anyone able to solve this issue? – C0D3 Jun 18 '15 at 21:15
  • @c0d3Junk13 I'm not sure if your case is the same as mine but I kinda managed to overcome this by just upgrading new Parse framework following this question http://stackoverflow.com/questions/29509641/apple-mach-o-linker-error-when-architectures-to-support-64-bit-added Have you tried that yet? – SanitLee Jun 19 '15 at 09:52
  • Thanks, so I should take out that line from the AppDelegate. However when I do this I'm running into different issues I believe due to my misconfiguration of the project... Here is one of the issues I'm having if you could help, I'd be very thankful: http://stackoverflow.com/questions/30925687/parse-loginwithusernameinbackground-block-callback-not-working – C0D3 Jun 21 '15 at 22:35
5

I was able to figure out the URL for anyone that needs Parse iOS v1.6.3.

https://parse.com/downloads/ios/parse-library/1.6.3

I can confirm that everything compiles properly using 1.6.3.

jdmorgenstein
  • 1,026
  • 7
  • 3
3

Placing

NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsException";

in the App Delegate as suggested by Sergey Surkov in between the imports and the implementation and then adding libstdc++.6.dylib in build phases worked for me. Please also view https://stackoverflow.com/a/27628797/1036945

Community
  • 1
  • 1
NSCoder
  • 1,594
  • 5
  • 25
  • 47
3

I've had the exact same problem using the latest SDKs from Parse (1.7.4) and Facebook (4.2.0). The problem is caused by the Bolts.framework included in both Parse and Facebook SDKs. For some reason the Bolts framework in Parse is always newer than the one included in the Facebook SDK.

After many-many attempts at installing, removing and re-installing these SDKs, using the drag and drop method and via Cocoapods, I finally managed to overcome this issue by undertaking the following steps:

  1. I removed completely any instance of the Parse, Facebook and Bolts frameworks from my project;
  2. I re-added the FBSDKCoreKit framework (and the ShareKit and LoginKit for the needs of my project) following the steps on the Facebook developer page: https://developers.facebook.com/docs/ios/getting-started/ Make sure NOT to copy the items to your project.
  3. I re-added the Parse framework to the project using the drag-and-drop method. I also added the ParseFacebookUtilsV4 framework because I needed it to create users via Facebook Login.

  4. This was the most important step that solved everything: I added the Bolts.framework provided by Parse by dragging it to the project, but making sure NOT to copy it to the project (just like with the FBSDKCoreKit framework, I deselected the "Copy items into destination group's folder." option. If you copy it to the project folder, the project won't build.

These steps finally solved all my problems.

2

if you are using cocoapods try pod update Bolts

Bobj-C
  • 5,276
  • 9
  • 47
  • 83
1

EDIT2: FacebookSDK Update 3.23.2 resolves this issue and includes Bolts 1.1.4: https://developers.facebook.com/resources/facebook-ios-sdk-3.23.2.pkg


EDIT: Drop -ObjC "Other Linker Flag" from your Build settings.


Bolts.framework is not necessary with Parse if Facebook SDK is integrated.
As of Facebook iOS SDK 3.14 bolts.framework is included. https://developers.facebook.com/docs/ios/upgrading-3.x

Try removing your manual instance of bolts.framework.

Mathu
  • 51
  • 5
  • If I remove Bolts framework, these errors are out. But - I get different errors because of missing Bolts framework while I have Parse Local Datastore implemented. (...... [[query findObjectsInBackground] continueWithSuccessBlock:^id(BFTask *task) { ......) NOTE: I have FacebookSDK linked in the project (and in header of this class as well). – mirap Mar 06 '15 at 16:29
  • Ok figured it out. Drop -ObjC "Other Linker Flag" from your Build settings. This might be an issue if you use CocoaPods, otherwise it is working now on my end. – Mathu Mar 06 '15 at 22:12
  • Ok, but I need -ObjC for GoogleMaps SDK. – mirap Mar 06 '15 at 22:36
  • Can you please explain how to Drop -ObjC "Other Linker Flag"? I am also in the same boat as all of you integrating Parse with Facebook SDK. I have removed the Bolts.framework and now have the same issue stated above. I am using Objectice-C, not Swift. – jdmorgenstein Mar 06 '15 at 23:09
  • @jdmorgenstein If you don't know how to drop it, you're probably building without -ObjC flag. :) Which is ok. – mirap Mar 09 '15 at 19:14
0

Just to put the record straight.

The issue is caused because of a conflict with the Bolts framework between the Facebook SDK Bolts and the Parse bolts framework. A temporary solution to get around this issue is to use Cocoapods for your Facebook SDK dependency which will help while a fix is worked on.

The bug has been acknowledged by Facebook & is being assigned to the appropriate team for fixing.

Please follow https://developers.facebook.com/bugs/383331175179417/ for the updates.

IT Gypsy
  • 658
  • 8
  • 16
0

make sure the facebook sdk framework and bolts framework (comes with fb sdk) is imported into your project.

Atma
  • 29,141
  • 56
  • 198
  • 299
0

i got similar error ("...is not a dylib" and "Undefined symbols for architecture") because i dragged the whole parse folder ("parse-library-1.7.4-2") into my xcode project, when i should have dragged only the frameworks i needed ("Bolts.framework" and "Parse.framework"). deleted the parse folder, dragged over the two frameworks, then everything works as expected :)

tmr
  • 1,500
  • 15
  • 22
-1

I had the exact same problem. Updating Bolts to 1.1.4 solved it for me (Bolts was 1.1.3 before).

If you use cocoapods, change or add this line to your podfile

pod 'Bolts', '1.1.4'

If not, just download it here : https://github.com/BoltsFramework/Bolts-iOS/releases

Jon - LBAB
  • 928
  • 11
  • 20
  • This works, but it makes conflict with FacebookSDK which has Bolts included. But - I cannot remove Bolts from my project (and - I cannot link to Bolts used in FacebookSDK). RESULT: I get 91 duplicates. – mirap Mar 07 '15 at 14:27
  • @mirap I also have Facebook SDK. I have it via cocoapods. I have no problem updating Bolts without updating Facebook SDK. This is my podfile config : pod 'Facebook-iOS-SDK', '3.23.0' pod 'Bolts', '1.1.4' – Jon - LBAB Mar 07 '15 at 18:21
-1

Try downloading the latest SDK and replacing all of the Parse frameworks with the latest version.

Michael Royzen
  • 463
  • 4
  • 12