'Xcode build failure "Undefined symbols for architecture x86_64" Ionic3 - IOS

Build Apllication ionic 3 IOS

I have to this mistake:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_BranchUniversalObject", referenced from:
      objc-class-ref in BranchSDK.o
  "_OBJC_CLASS_$_BNCProduct", referenced from:
      objc-class-ref in BranchSDK.o
  "_OBJC_CLASS_$_BranchLinkProperties", referenced from:
      objc-class-ref in BranchSDK.o
  "_OBJC_CLASS_$_BNCCommerceEvent", referenced from:
      objc-class-ref in BranchSDK.o
  "_BNCProductCategoryAnimalSupplies", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryApparel", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryArtsEntertainment", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryHomeGarden", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryBusinessIndustrial", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_OBJC_CLASS_$_BranchEvent", referenced from:
      objc-class-ref in BranchSDK.o
  "_BNCProductCategoryFoodBeverageTobacco", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryCamerasOptics", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryBabyToddler", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryFurniture", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryMedia", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategorySportingGoods", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryLuggageBags", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryOfficeSupplies", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategorySoftware", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_OBJC_CLASS_$_Branch", referenced from:
      objc-class-ref in BranchSDK.o
      objc-class-ref in AppDelegate+BranchSdk.o
     (maybe you meant: _OBJC_CLASS_$_BranchSDK)
  "_BNCProductCategoryMature", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryReligious", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryHardware", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryHealthBeauty", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryToysGames", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryElectronics", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
  "_BNCProductCategoryVehiclesParts", referenced from:
      -[BranchSDK sendCommerceEvent:] in BranchSDK.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **


The following build commands failed:
(1 failure)
xcodebuild: Command failed with exit code 65
[ERROR] An error occurred while running subprocess cordova.

I did test different solutions without success:

  • remove platform
  • pod install
  • update to homebrew

Enviorement:

Ionic:

   Ionic CLI          : 6.19.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework    : ionic-angular 3.9.10
   @ionic/app-scripts : 3.2.4

Cordova:

   Cordova CLI       : 11.0.0
   Cordova Platforms : ios 6.2.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 5.0.0, (and 18 other plugins)

Utility:

   cordova-res : 0.15.4
   native-run  : not installed globally

System:

   ios-sim : 8.0.2
   NodeJS  : v12.16.2 (/usr/local/bin/node)
   npm     : 6.14.4
   OS      : macOS Monterey
   Xcode   : Xcode 13.3.1 Build version 13E500a

plugins:

branch-cordova-sdk 4.1.2 "branch-cordova-sdk"
com.darktalker.cordova.screenshot 0.1.5 "Screenshot"
cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport"
cordova-plugin-androidx-adapter 1.1.3 "cordova-plugin-androidx-adapter"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-facebook-connect 3.2.0 "Facebook Connect"
cordova-plugin-file-opener2 3.0.5 "File Opener2"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-inappbrowser 5.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-native-spinner 1.1.3 "Native Spinner"
cordova-plugin-nativegeocoder 3.4.1 "NativeGeocoder"
cordova-plugin-sign-in-with-apple 0.1.2 "cordova-plugin-sign-in-with-apple"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-telerik-imagepicker 2.2.4 "ImagePicker"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 6.0.3 "SocialSharing"
cordova.plugins.diagnostic 6.0.4 "Diagnostic"
es6-promise-plugin 4.2.2 "Promise"
sentry-cordova 1.0.0-rc.0 "Sentry"

I had to change XCode version, en other old version my application build success.

thanks,thanks, thanks,thanks, thanks,thanks, thanks,thanks, thanks,thanks, thanks,thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source