iOS Question Facebook SDK compile problem

Discussion in 'iOS Questions' started by Roycefer, Jun 29, 2019.

  1. Roycefer

    Roycefer Well-Known Member Licensed User

    I am trying to run in debug mode a project that uses the Facebook SDK to track app events as described here:

    https://developers.facebook.com/docs/ios/getting-started/

    When I compile in debug mode, I get the following compilation error:
    Code:
    Undefined symbols for architecture armv7:
      
    "_OBJC_CLASS_$_FIRAuth", referenced from:
          objc-class-ref 
    in libiFacebook.a(iFacebook.o)
      
    "_OBJC_CLASS_$_FIRFacebookAuthProvider", referenced from:
          objc-class-ref 
    in libiFacebook.a(iFacebook.o)
    ld: symbol(s) 
    not found for architecture armv7
    clang: error: linker command failed with 
    exit code 1 (use -v to see invocation)
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. Roycefer

    Roycefer Well-Known Member Licensed User

    I should have mentioned that I'm using the hosted builder. I'm also using B4i 5.8.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    I see. Only the login framework is included with iFacebook library.
     
  5. Roycefer

    Roycefer Well-Known Member Licensed User

    The Facebook code snippet at the link in my first post is this:
    Code:
    //  AppDelegate.m
    #import <FBSDKCoreKit/FBSDKCoreKit.h>
    - (void)applicationDidBecomeActive:(UIApplication *)
    application {
      [FBSDKAppEvents activateApp];
    }
    The iFacebook.xml file has a line at the bottom that says
    Code:
    <dependsOn>FBSDKCoreKit.framework.3</dependsOn>
    Shouldn't that dependsOn line cover the #import from the code snippet? If not, should I add some more dependsOn lines to the XML files (and if so, which ones?)?
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Can you upload the project?
     
  7. Roycefer

    Roycefer Well-Known Member Licensed User

    The project has some private stuff in it and it is too large to upload. Can I email it to you?
     
  8. Erel

    Erel Administrator Staff Member Licensed User

  9. Roycefer

    Roycefer Well-Known Member Licensed User

    Erel, did you get my email? I put "Facebook SDK compilation problem" in the subject field.
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    Yes. And the answer is that you must add references to iFirebaseAuth and iFirebaseAnalytics.
     
  11. Roycefer

    Roycefer Well-Known Member Licensed User

    Before I had tried it with just iFirebaseAuth and it didn't work. But with both it works. Thank you.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice