swift – iOS build linker command failed for FirebaseCoreInternal React Native


I am trying to run and build an old but existing react native application in XCode 15.2. But I not able to fix the error below. I have listed my package.json and podfile below. Is it a firebase related issue or Xcode related ? Due I need to downgrade my Xcode version for this ?

My device Specification -> M2 Macbook Pro 8GB

ld: Undefined symbols:
  _swift_stdlib_isStackAllocationSafe, referenced from:
      function signature specialization <Arg[1] = Owned To Guaranteed> of function signature specialization <Arg[0] = [Closure Propagated : reabstraction thunk helper from @callee_guaranteed (@unowned FirebaseCoreInternal.TimePeriod, @in_guaranteed Foundation.Date) -> (@unowned Swift.Bool, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed FirebaseCoreInternal.TimePeriod, @in_guaranteed Foundation.Date) -> (@unowned Swift.Bool, @error @owned Swift.Error), Argument Types : [@callee_guaranteed (@unowned FirebaseCoreInternal.TimePeriod, @in_guaranteed Foundation.Date) -> (@unowned Swift.Bool, @error @owned Swift.Error)]> of generic specialization <FirebaseCoreInternal.TimePeriod, Foundation.Date> of Swift._NativeDictionary.filter(((key: A, value: B)) throws -> Swift.Bool) throws -> Swift._NativeDictionary<A, B> in FirebaseCoreInternal[x86_64][7](HeartbeatController.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

package.json below:

"@react-native-async-storage/async-storage": "^1.14.1",
        "@react-native-community/cameraroll": "^4.0.4",
        "@react-native-community/masked-view": "0.1.10",
        "@react-native-firebase/app": "^15.4.0",
        "@react-native-firebase/messaging": "^15.1.1",
        "@react-native-picker/picker": "1.9.2",
        "@react-navigation/drawer": "^5.11.4",
        "@react-navigation/native": "^5.8.10",
        "@react-navigation/stack": "^5.12.8",
        "axios": "^0.21.1",
        "dayjs": "^1.11.5",
        "expo": "^40.0.0",
        "expo-location": "~10.0.0",
        "expo-permissions": "~10.0.0",
        "expo-splash-screen": "~0.8.1",
        "expo-status-bar": "~1.0.3",
        "expo-updates": "~0.4.0",
        "geolib": "^3.3.1",
        "jwt-decode": "^3.1.2",
        "patch-package": "^8.0.0",
        "react": "16.13.1",
        "react-dom": "16.13.1",
        "react-native": "~0.63.4",
        "react-native-animated-spinkit": "^1.4.2",
        "react-native-gesture-handler": "~1.8.0",
        "react-native-google-places-autocomplete": "^2.1.2",
        "react-native-image-zoom-viewer": "^3.0.1",
        "react-native-maps": "^1.7.0",
        "react-native-maps-directions": "^1.8.0",
        "react-native-modal": "^11.6.1",
        "react-native-modalize": "^2.0.8",
        "react-native-razorpay": "^2.2.2",
        "react-native-reanimated": "~1.13.0",
        "react-native-safe-area-context": "3.1.9",
        "react-native-screens": "~2.15.2",
        "react-native-simple-toast": "^1.1.3",
        "react-native-snap-carousel": "^3.9.1",
        "react-native-unimodules": "~0.12.0",
        "react-native-web": "~0.13.12",
        "react-query": "^2.26.3",
        "react-redux": "^7.2.2",
        "redux": "^4.0.5",
        "redux-thunk": "^2.3.0",
        "rn-fetch-blob": "^0.12.0"
    },

Podfile below

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '13.4'

target 'userapp' do
  pod 'Google-Maps-iOS-Utils', :git => 'https://github.com/Simon-TechForm/google-maps-ios-utils.git', :branch => 'feat/support-apple-silicon'
  rn_maps_path="../node_modules/react-native-maps"
  pod 'react-native-google-maps', :path => rn_maps_path
  pod 'react-native-maps', :path => rn_maps_path
  pod 'GoogleMaps'
  use_unimodules!
  use_frameworks! :linkage => :static
  $RNFirebaseAsStaticFramework = true
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  # Uncomment the code below to enable Flipper.
  #
  # You should not install Flipper in CI environments when creating release
  # builds, this will lead to significantly slower build times.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work.
  #
  #  use_flipper!
  #  post_install do |installer|
  #    flipper_post_install(installer)
  #  end
end

solutions from:

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img