Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

51 duplicate symbols for architecture x86_64 #302

Open
chaudharyvikram opened this issue Jun 29, 2021 · 5 comments
Open

51 duplicate symbols for architecture x86_64 #302

chaudharyvikram opened this issue Jun 29, 2021 · 5 comments

Comments

@chaudharyvikram
Copy link

chaudharyvikram commented Jun 29, 2021

Ad Modules

-Banner Ads
-Interstitial Ads

Platforms

-iOS

Versions

  • react-native-fbads: 7.0.5
  • react-native: 0.62.2

Issue

When we try to install pod after installing npm package of Facebook ads, There are three pods are installing.

  • Installing FBAudienceNetwork (6.5.1)
  • Installing FBSDKCoreKit_Basics (11.0.1)
  • Installing ReactNativeAdsFacebook (7.0.5)

After this we try to run our app and it throws error in FBSDKUtility and SessionProvider in FBSDKCoreKit_Basics Pod folder. after importing appropriate packages for error, we tried to run again our app. But At build time FBSDKCoreKit_Basics conflicts with FBSDKCoreKit which is installed for Facebook login functionality.

  • Why FBSDKCoreKit_Basics is needs to b installed with FBAudienceNetwork when the same code and functionality already available in FBSDKCoreKit SDK? Due to this conflict and duplicate pods we can not able to ad Facebook ads in our application.

Screenshot 2021-06-29 at 6 08 10 PM

Steps to generate issue

  • Create new React-Native project using "expo init [Project-Name]" Command
  • Install Package For Facebook Login using "npm install --save react-native-fbsdk" Command
  • Install Package For Facebook Audience Network using "npm install --save react-native-fbads" Command
  • Install Pods for above commands using "cd ios && pod install" Command
  • Run the project using "npm run ios" command. Build will fails due to "Cannot find protocol declaration for 'FBSDKSessionProviding'" See Attached ScreenShot below:

Screenshot 2021-06-29 at 5 58 03 PM

  • Fix above issue by importing "FBSDKSessionProviding.h" header file.
  • Now You may see another errors like in Below ScreenShot

Screenshot 2021-06-29 at 6 01 09 PM

  • Fix above error by removing below imports
    #import "FBSDKBasicUtility.h"
    #import "FBSDKTypeUtility.h"

and add below line after removing above code
#import <FBSDKCoreKit_Basics/FBSDKCoreKit_Basics.h>

  • Run Project again in iOS
  • Now You can see main error which conflict the Both SDK. Error: 51 duplicate symbols for architecture x86_64 See First ScreenShot.

Please look into this asap. We tried almost all solution available in google search.

Thank You

@teamseamive
Copy link

The same error seems to occur

Packages info:

    "react": "17.0.1",
    "react-native": "^0.64.2",
    "react-native-fbads": "^7.0.5",
    "react-native-fbsdk-next": "^4.3.0",

Error Thrown

duplicate symbol '_FBSDKAppEventPhone' in:
    /Users/sagar/Library/Developer/Xcode/DerivedData/superapp-cfatsrwpxtvtdwfboqdkuquttydf/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o)
    /Users/sagar/Library/Developer/Xcode/DerivedData/mySuperApp-cfatsrwpxtvtdwfboqdkuquttydf/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o)
duplicate symbol '_FBSDKAppEventFirstName' in:
    /Users/sagar/Library/Developer/Xcode/DerivedData/superapp-cfatsrwpxtvtdwfboqdkuquttydf/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o)
    /Users/sagar/Library/Developer/Xcode/DerivedData/elliel-cfatsrwpxtvtdwfboqdkuquttydf/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o)
duplicate symbol '_FBSDKAppEventLastName' in:
    /Users/sagar/Library/Developer/Xcode/DerivedData/superapp-cfatsrwpxtvtdwfboqdkuquttydf/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o)
    /Users/sagar/Library/Developer/Xcode/DerivedData/superapp-cfatsrwpxtvtdwfboqdkuquttydf/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o)
duplicate symbol '_FBSDKAppEventExternalId' in:
    /Users/sagar/Library/Developer/Xcode/DerivedData/superapp-cfatsrwpxtvtdwfboqdkuquttydf/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o)
    /Users/sagar/Library/Developer/Xcode/DerivedData/superapp-cfatsrwpxtvtdwfboqdkuquttydf/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o)
ld: 58 duplicate symbols for architecture x86_64

@tmjordan
Copy link

tmjordan commented Jul 7, 2021

Use FBAudienceNetwork 6.4.1 instead as a workaround or updates Facebook SDK to the latest version.

@chaudharyvikram
Copy link
Author

@tmjordan Yes, 6.4.1 SDK is working fine. we also used this version.

@SafiDS
Copy link

SafiDS commented Jul 27, 2021

@tmjordan How I Can Change FBAudienceNetwork6.4.1?
which file i have to change ?

@tmjordan
Copy link

@SafiDS add this line in your podfile

pod 'FBAudienceNetwork', '~> 6.4.1'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants