3

I searched a lot and I realized, -ObjC flag that GoogleMapSDK requires, doesn't play well with ParseSDK and FacebookSDK. So I read on all the stackoverflow answers and tried solving my problem. The problem isn't fixed yet.

Steps I performed:

  • Problem 1:Parse doesn't work with -ObjC
  • Solution 1: To make Parse work with -ObjC import the FacebookSDK. Done

  • Problem 2: Parse and Fb SDK both use Bolts.framework and the linker gives duplicate symbol errors(some 92 of them)

  • Solution 2: Delete Bolts.framework as FacebookSDK already is pre-bundled with it.

  • Problem 3: After removing the Bolts.framework , duplicate errors go away but there is this one tiny linker error that I can't figure out. I'm assuming they've changed something in the new SDK version. The error is as follows:

  • Solution: ??

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)

The same problem was asked in the comments of [this answer on SO][1] without any reply or a constructive answer.

P.S. One thing I noticed that FacebookSDK comes bundled with Bolts version 1.1.3 and Parse has a version 1.1.4 in its zip file. Is this causing the problem?? P.P.S. I'm using the latest verions of SDK as of today's date(19th March, 2015)

They are: - Parse SDK: 1.6.4 - GoogleMaps SDK: 1.9.2

leo
  • 1,423
  • 2
  • 14
  • 23
  • 1
    Use CocoaPods to manage all of these dependencies for you? – Jon Shier Mar 19 '15 at 03:12
  • As @jshier said. just use CocoaPods. http://cocoapods.org/ I think that you'll find all these issues will just disappear. Best of luck – user2877496 Mar 19 '15 at 03:51
  • @Logan I tried using -force_load , it doesn't seem to work. Plus it's a work around, and I'be read it breaks a few things in Google maps. So I'm not keen on using it – leo Mar 19 '15 at 05:29
  • @jshier cocoa pods will do automatically what I did manually. What else does cocoa pods do that'll make my problem go away? I've never used cocoa pods. Explain I'm wrong. – leo Mar 19 '15 at 05:32
  • @user2877496 again, the same question that I asked jshier, what does cocoa pods do (apart from version handling automatically) that'll help me solve my problem? – leo Mar 19 '15 at 05:34
  • @leo It takes care of setting up all of the linking and integration into your binary so you avoid these issues. Give it a try, it shouldn't be to hard to setup a Podfile that links Parse, GoogleMaps, and Facebook. – Jon Shier Mar 20 '15 at 17:15

2 Answers2

2

Back when the Google Maps SDK for iOS came out, I tried a few methods for hacking around some linker errors:

Google Maps SDK for iOS trying to run on iOS 4.3

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.

Community
  • 1
  • 1
Saxon Druce
  • 17,406
  • 5
  • 50
  • 71
  • Seems to be a known issue that Facebook are working on, and Sergey posted the same workaround as my suggestion: http://stackoverflow.com/questions/28898999/parse-api-1-6-4-cannot-build-project – Saxon Druce Mar 19 '15 at 03:20
  • So from what I understand, I have 3 solutions to try from: (In order of pref): 1. Switch to Parse SDK that uses Bolts 1.1.3 instead of 1.1.4 2. Enforce Bolts 1.1.4 on FacebookSDK by cocoapods 3. Redefine the missing symbols as mentioned by @Saxon Druce – leo Mar 19 '15 at 07:24
  • @Saxron do you have the link for parse ios sdk version 1.6.3 ? – leo Mar 19 '15 at 07:34
  • Hi leo, going by this comment http://stackoverflow.com/questions/28898999/parse-api-1-6-4-cannot-build-project#comment46486162_28909595 it looks like Parse have broken the links to their old downloads, and so now they always download the broken version 1.6.4 :| – Saxon Druce Mar 19 '15 at 11:53
  • @saxron even after your code for google maps I get the same error. see the update – leo Mar 19 '15 at 12:03
  • Hmm, are you sure you've put it somewhere at global scope in one of your .m files that is definitely getting built? eg not inside a method or class or something? – Saxon Druce Mar 19 '15 at 12:41
  • I put it in appdelegate.m in didLaunchWithOpitions method – leo Mar 19 '15 at 12:44
  • 1
    Ah, it should be outside of your method. However it sounds like downgrading to Parse 1.6.3 which you managed to find is the better approach :) – Saxon Druce Mar 19 '15 at 13:00
1

So Bolts Framework 1.1.3 works with Parse 1.6.3. But Parse 1.6.3 was not found anywhere. So I did a lot of digging around and went into the json files of cocoa pods and got the direct link to download Parse 1.6.3 or any version of any framework for that matter. github.com/CocoaPods/Specs of cocoa pods is the repository to look into.

For everyone else, who specifically are looking for Parse 1.6.3. This is the link Just find the source link in the json and copy it in your browser.

I am closing this question with the finale conclusion:

Parse 1.6.3 and FacebookSDK 3.93 depend on Bolts 1.1.3

Parse 1.6.4 is updated with Bolts 1.1.4 but as of this date facebook sdk isnt. Hence we have to work with Parse 1.6.3 till facebook sdk is updated with bolts 1.1.4

leo
  • 1,423
  • 2
  • 14
  • 23