ios – XCode unable to construct React-Native undertaking


I am attempting to construct my React Native app for iOS however I’m working into some points. For starters, here is my package deal.json file:

{
  "title": "MyRNApp",
  "model": "1.7.0",
  "non-public": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "begin": "react-native begin",
    "check": "jest"
  },
  "dependencies": {
    "@apollo/shopper": "^3.11.4",
    "@notifee/react-native": "^7.8.2",
    "@react-native-async-storage/async-storage": "^1.24.0",
    "@react-native-clipboard/clipboard": "^1.13.0",
    "@react-native-community/blur": "^4.4.0",
    "@react-native-community/checkbox": "^0.5.17",
    "@react-native-community/datetimepicker": "^8.2.0",
    "@react-native-community/geolocation": "^3.3.0",
    "@react-native-firebase/app": "^20.3.0",
    "@react-native-firebase/messaging": "^20.3.0",
    "@react-native-google-signin/google-signin": "^12.2.1",
    "@react-navigation/bottom-tabs": "^6.6.0",
    "@react-navigation/drawer": "^6.7.0",
    "@react-navigation/parts": "^1.3.31",
    "@react-navigation/material-top-tabs": "^6.6.14",
    "@react-navigation/native": "^6.1.17",
    "@react-navigation/native-stack": "^6.10.0",
    "@react-navigation/stack": "^6.4.1",
    "@tanstack/react-query": "^5.50.1",
    "@twotalltotems/react-native-otp-input": "^1.3.11",
    "axios": "^1.7.2",
    "datetimepicker": "^0.1.39",
    "graphql": "^16.9.0",
    "i18next": "^23.12.2",
    "lottie-react-native": "^6.7.2",
    "react": "18.2.0",
    "react-i18next": "^15.0.0",
    "react-native": "0.74.3",
    "react-native-android-location-enabler": "^2.0.1",
    "react-native-animatable": "^1.4.0",
    "react-native-calendars": "^1.1306.0",
    "react-native-dotenv": "^3.4.11",
    "react-native-elements": "^3.4.3",
    "react-native-gesture-handler": "^2.18.0",
    "react-native-get-location": "^4.0.1",
    "react-native-image-picker": "^7.1.2",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-keychain": "^8.2.0",
    "react-native-linear-gradient": "^2.8.3",
    "react-native-pager-view": "^6.3.3",
    "react-native-paper": "^5.12.3",
    "react-native-ratings": "^8.1.0",
    "react-native-raw-bottom-sheet": "^3.0.0",
    "react-native-reanimated": "^3.14.0",
    "react-native-responsive-screen": "^1.4.2",
    "react-native-safe-area-context": "^4.10.8",
    "react-native-screens": "^3.32.0",
    "react-native-size-matters": "^0.4.2",
    "react-native-svg": "^15.4.0",
    "react-native-svg-transformer": "^1.5.0",
    "react-native-tab-view": "^3.5.2",
    "react-native-vector-icons": "^10.1.0",
    "socket.io-client": "^4.7.5",
    "zustand": "^4.5.4"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/babel-preset": "0.74.85",
    "@react-native/eslint-config": "0.74.85",
    "@react-native/metro-config": "0.74.85",
    "@react-native/typescript-config": "0.74.85",
    "@varieties/react": "^18.2.6",
    "@varieties/react-native-check-box": "^2.1.6",
    "@varieties/react-native-vector-icons": "^6.4.18",
    "@varieties/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.6.3",
    "eslint": "^8.57.0",
    "jest": "^29.6.3",
    "prettier": "2.8.8",
    "react-test-renderer": "18.2.0",
    "typescript": "5.0.4"
  },
  "engines": {
    "node": ">=18"
  }
}

And here is the Podfile:

# Resolve react_native_pods.rb with node to permit for hoisting
require Pod::Executable.execute_command('node', ['-p',
  'require.resolve(
    "react-native/scripts/react_native_pods.rb",
    {paths: [process.argv[1]]},
  )', __dir__]).strip

platform :ios, min_ios_version_supported
prepare_react_native_project!

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.places "Configuring Pod with #{linkage}ally linked Frameworks".inexperienced
  use_frameworks! :linkage => linkage.to_sym
finish

goal 'MyRNApp' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # An absolute path to your utility root.
    :app_path => "#{Pod::Config.occasion.installation_root}/.."
  )

  goal 'MyRNAppTests' do
    inherit! :full
    # Pods for testing
  finish

  post_install do |installer|
    # https://github.com/fb/react-native/blob/foremost/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false,
      # :ccache_enabled => true
    )
  finish
finish

After I do pod set up I get this error:

[!] The next Swift pods can not but be built-in as static libraries:

The Swift pod `FirebaseCoreInternal` relies upon upon `GoogleUtilities`, which doesn't outline modules. To choose into these targets producing module maps (which is critical to import them from Swift when constructing as static libraries), chances are you'll set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for specific dependencies.

If I attempt to add the road use_modular_headers!, I’m able to do pod set up however after I run the undertaking in XCode and construct it, I get this error:

/Customers/myuser/Library/Developer/Xcode/DerivedData/MyRNApp-bbxbgmmqpwnecedpcqqamjhrxvpq/Construct/Intermediates.noindex/MyRNApp.construct/Debug-iphoneos/MyRNApp.construct/DerivedSources/MyRNApp.c module map file '/Customers/myuser/Library/Developer/Xcode/DerivedData/MyRNApp-bbxbgmmqpwnecedpcqqamjhrxvpq/Construct/Merchandise/Debug-iphoneos/FirebaseCoreInternal/FirebaseCoreInternal.modulemap' not discovered

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles