skip to Main Content

I am having issues,

I am trying to run react native app with react-native-firebase/crashlytics. The app was working fine before when I added this package and it is causing build issues on iOS. I tried updating packages. Remove yarn.lock, reset pods, clean build, etc. but the error doesn’t go away.

[   +8 ms] Failed to build iOS app
[        ] Error (Xcode): Undefined symbol: _SKAdNetworkCoarseConversionValueHigh
           
[   +1 ms] Error (Xcode): Undefined symbol: _SKAdNetworkCoarseConversionValueLow
           
[        ] Error (Xcode): Undefined symbol: _SKAdNetworkCoarseConversionValueMedium
           
[        ] Could not build the application for the simulator.
[        ] Error launching application on iPhone 14.
[   +1 ms] "flutter run" took 152,921ms.

Here is my pod file:

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

platform :ios,  min_ios_version_supported
prepare_react_native_project!

# Force pods to match minimum iOS version for React Native
# Fixes build issue on Xcode Cloud where some pods
# Use iOS 12 calls despite being set as iOS 11
def __apply_Xcode_14_3_RC_post_install_workaround(installer)
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      current_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
      minimum_target = min_ios_version_supported
      if current_target.to_f < minimum_target.to_f
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = minimum_target
      end
    end
  end
end

flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

target 'Plumm' do
  permissions_path = '../node_modules/react-native-permissions/ios'

  pod 'GoogleSignIn', '~> 6.1.0'

  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

  pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'

  # pod 'react-native-webview', :path => '../node_modules/react-native-webview'

  pod 'react-native-voice', :path => '../node_modules/@react-native-community/voice'
  pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone"
  pod 'Permission-SpeechRecognition', :path => "#{permissions_path}/SpeechRecognition"
  pod 'Permission-FaceID', :path => "#{permissions_path}/FaceID"
  pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
  pod 'GoogleUtilities', :modular_headers => true
  pod 'FirebaseCore', :modular_headers => true
  pod 'FirebaseSessions'
  pod 'FirebaseCoreExtension', :modular_headers => true
  pod 'FirebaseInstallations', :modular_headers => true
  pod 'GoogleDataTransport', :modular_headers => true
  pod 'nanopb', :modular_headers => true
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec', :modular_headers => false

  config = use_native_modules!
  # Flags change depending on the env values.
  flags = get_default_flags()
  pod 'react-native-twilio-video-webrtc', path: '../node_modules/react-native-twilio-video-webrtc'

  use_react_native!(
    :path => config[:reactNativePath],
    # Hermes is now enabled by default. Disable by setting this flag to false.
    # Upcoming versions of React Native may rely on get_default_flags(), but
    # we make it explicit here to aid in the React Native upgrade process.
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    :flipper_configuration => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
      )

  target 'PlummTests' do
    inherit! :complete
    # Pods for testing
  end


type here


  post_install do |installer|

    react_native_post_install(
      installer,
      # Set `mac_catalyst_enabled` to `true` in order to apply patches
      # necessary for Mac Catalyst builds
      :mac_catalyst_enabled => false
    )
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
    __apply_Xcode_14_3_RC_post_install_workaround(installer) # Add this line

    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No'
       end
    end
  end
end

package.json:

{
  "name": "-----",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest",
    "resetPods": "cd ios && rm Podfile.lock && pod deintegrate && cd .. && yarn && cd ios && pod install && cd .. && yarn start",
    "postinstall": "patch-package"
  },
  "dependencies": {
    "@heap/react-native-heap": "^0.22.1",
    "@react-native-async-storage/async-storage": "^1.17.11",
    "@react-native-clipboard/clipboard": "^1.8.5",
    "@react-native-community/datetimepicker": "^5.1.0",
    "@react-native-community/netinfo": "^9.3.0",
    "@react-native-community/push-notification-ios": "^1.10.1",
    "@react-native-community/voice": "^1.1.9",
    "@react-native-firebase/analytics": "^18.3.0",
    "@react-native-firebase/app": "^18.3.0",
    "@react-native-firebase/crashlytics": "^18.3.0",
    "@react-native-firebase/messaging": "^18.3.0",
    "@react-native-google-signin/google-signin": "^7.0.0-alpha.3",
    "@react-native-masked-view/masked-view": "^0.2.6",
    "@react-navigation/bottom-tabs": "^6.2.0",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/native-stack": "^6.6.1",
    "@react-navigation/stack": "^6.0.11",
    "@sayem314/react-native-keep-awake": "^1.0.4",
    "aes-everywhere": "^1.0.0",
    "axios": "^0.24.0",
    "axios-rate-limit": "^1.3.0",
    "jail-monkey": "^2.7.0",
    "jwt-decode": "^3.1.2",
    "lodash": "^4.17.21",
    "lottie-ios": "3.4.0",
    "lottie-react-native": "^5.1.4",
    "moment": "^2.29.1",
    "moment-timezone": "^0.5.34",
    "obfuscator-io-metro-plugin": "^2.1.1",
    "patch-package": "^6.4.7",
    "react": "^18.2.0",
    "react-hook-form": "^7.27.0",
    "react-native": "0.71.0",
    "react-native-actionsheet": "^2.4.2",
    "react-native-android-keyboard-adjust": "^1.2.0",
    "react-native-audio-recorder-player": "^3.5.1",
    "react-native-chart-kit": "^6.12.0",
    "react-native-confirmation-code-field": "^7.3.1",
    "react-native-country-picker-modal": "^2.0.0",
    "react-native-crypto-js": "^1.0.0",
    "react-native-device-info": "^10.3.0",
    "react-native-document-picker": "^8.0.0",
    "react-native-error-boundary": "^1.2.3",
    "react-native-exception-handler": "^2.10.10",
    "react-native-fast-image": "^8.5.11",
    "react-native-file-viewer": "^2.1.5",
    "react-native-fs": "^2.18.0",
    "react-native-gesture-handler": "^2.9.0",
    "react-native-gif-search": "^1.3.2",
    "react-native-gifted-chat": "^2.4.0",
    "react-native-image-picker": "^4.10.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-keychain": "^8.1.1",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-localize": "^2.2.3",
    "react-native-modal": "^13.0.0",
    "react-native-modal-datetime-picker": "^13.1.0",
    "react-native-msal": "^4.0.4",
    "react-native-music-control": "^1.4.1",
    "react-native-permissions": "^3.3.1",
    "react-native-push-notification": "^8.1.1",
    "react-native-reanimated": "3.1.0",
    "react-native-render-html": "^6.3.4",
    "react-native-responsive-screen": "^1.4.2",
    "react-native-restart": "^0.0.27",
    "react-native-safe-area-context": "^4.2.2",
    "react-native-screens": "^3.10.1",
    "react-native-size-matters": "^0.4.0",
    "react-native-skeleton-placeholder": "^5.0.0",
    "react-native-slider": "^0.11.0",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-splash-screen": "^3.3.0",
    "react-native-svg": "^12.1.1",
    "react-native-twilio-video-webrtc": "https://github.com/blackuy/react-native-twilio-video-webrtc",
    "react-native-url-polyfill": "^1.3.0",
    "react-native-vector-icons": "^9.1.0",
    "react-native-video": "^5.2.0",
    "react-native-webview": "^11.18.1",
    "react-native-wistia-player": "github:candidco/react-native-wistia-player",
    "react-redux": "^7.2.6",
    "redux": "^4.1.2",
    "redux-devtools-extension": "^2.13.9",
    "redux-persist": "^6.0.0",
    "redux-thunk": "^2.4.1",
    "socket.io-client": "2.1.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/preset-env": "^7.14.0",
    "@babel/preset-typescript": "^7.21.5",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^3.0.0",
    "@tsconfig/react-native": "^2.0.2",
    "@types/jest": "^29.2.1",
    "@types/react": "^18.0.24",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.2.1",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "eslint": "^8.19.0",
    "eslint-config-airbnb": "^19.0.4",
    "eslint-config-prettier": "^8.3.0",
    "eslint-plugin-import": "^2.25.4",
    "eslint-plugin-jsx-a11y": "^6.5.1",
    "eslint-plugin-react": "^7.28.0",
    "eslint-plugin-react-hooks": "^4.3.0",
    "eslint-plugin-react-native": "^4.0.0",
    "jest": "^29.2.1",
    "jetifier": "^1.6.8",
    "metro-react-native-babel-preset": "^0.73.5",
    "prettier": "2.4.1",
    "react-native-svg-transformer": "^1.0.0",
    "react-test-renderer": "18.2.0",
    "typescript": "4.8.4"
  },
  "jest": {
    "preset": "react-native"
  },
  "resolutions": {
    "react-native-gesture-handler": "^2.1.1",
    "react-native-reanimated": "^2.3.1"
  }
}

Any help will be appreciated.

2

Answers


  1. The Firebase Apple SDK requires 14.1 or later. These StoreKit symbols were not defined in the StoreKit SDK that Xcode 14 is building against– leading to the errors.

    Updating to a newer Xcode version should resolve the issue.

    Login or Signup to reply.
  2. I’m developing a flutter app and experienced the same issue after importing firebase_analytics. I tried all the solutions i could find online and none of them worked.It seems the firebase_analytics is not supported by Xcode 14.1 or below and if your Mac can’t support macOS higher than 12 then you can’t update your Xcode to versions later than 14.1 and Apparently, the only way to solve this issue is to just remove firebase_analytics or react-native-firebase/crashlytics in your case.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search