ios – How you can resolve ‘non-modular-include-in-framework-module’ error in Xcode 16.0 with React Native 0.78.1?

0
3
ios – How you can resolve ‘non-modular-include-in-framework-module’ error in Xcode 16.0 with React Native 0.78.1?


I am encountering a recurring construct error in Xcode 16.0 when constructing my React Native app (model 0.78.1). The error particularly states:

non-modular-include-in-framework-module

This happens in a number of React Native dependencies, similar to react-native-reanimated, react-native-permissions, and react-native-fast-image. The venture makes use of Swift and Goal-C combined recordsdata, and the issue constantly occurs when importing these modules.

Steps Already Tried:

Setting Enable Non-modular Consists of in Framework Modules to YES in Construct Settings.

Clearing Derived Knowledge (~/Library/Developer/Xcode/DerivedData) and re-building.

Cleansing and reinstalling pods utilizing:

cd ios && pod deintegrate && rm -rf Podfile.lock && pod set up

Making certain all pod targets use use_frameworks! :linkage => :static to align with React Native’s newest suggestions.

Verified that HEADER_SEARCH_PATHS are appropriately set.

Regardless of these steps, the error persists.

Surroundings Particulars:

React Native: 0.78.1

Xcode: 16.0

Node: >=18

Package deal.json: (Dependencies listed above)

Pods setup: use_frameworks! :linkage => :static

Does anybody have ideas for resolving this explicit difficulty or insights into why this would possibly proceed taking place regardless of the steps talked about above?enter image description here

bundle.json

  "identify": "MyHair",
  "model": "0.0.1",
  "personal": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "begin": "react-native begin",
    "check": "jest"
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "^2.0.0",
    "@react-native-community/checkbox": "^0.5.17",
    "@react-native-community/datetimepicker": "^8.3.0",
    "@react-native-community/geolocation": "^3.4.0",
    "@react-native-masked-view/masked-view": "^0.3.1",
    "@react-navigation/bottom-tabs": "^6.6.1",
    "@react-navigation/native": "^6.1.18",
    "@react-navigation/native-stack": "^6.11.0",
    "@react-navigation/stack": "^6.4.1",
    "@sentry/react-native": "^5.36.0",
    "@tanstack/react-query": "^5.65.1",
    "axios": "^1.7.9",
    "dayjs": "^1.11.13",
    "hermes-engine": "^0.11.0",
    "jwt-decode": "^4.0.0",
    "react": "19.0.0",
    "react-native": "0.78.1",
    "react-native-calendars": "^1.1307.0",
    "react-native-config": "^1.5.3",
    "react-native-dialog": "^9.3.0",
    "react-native-encrypted-storage": "^4.0.3",
    "react-native-fast-image": "^8.6.3",
    "react-native-fs": "^2.20.0",
    "react-native-geolocation-service": "^5.3.1",
    "react-native-gesture-handler": "^2.20.0",
    "react-native-image-crop-picker": "^0.42.0",
    "react-native-image-picker": "^7.2.3",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-linear-gradient": "^2.8.3",
    "react-native-paper": "^5.12.5",
    "react-native-permissions": "^5.3.0",
    "react-native-reanimated": "^3.17.1",
    "react-native-safe-area-context": "^5.3.0",
    "react-native-screens": "^3.34.0",
    "react-native-splash-screen": "^3.3.0",
    "react-native-star-rating-widget": "^1.9.2",
    "react-native-svg": "^15.10.1",
    "react-native-toast-message": "^2.2.1",
    "react-native-vector-icons": "^10.2.0"
  },
  "devDependencies": {
    "@babel/core": "^7.25.2",
    "@babel/preset-env": "^7.25.3",
    "@babel/runtime": "^7.25.0",
    "@react-native-community/cli": "15.0.1",
    "@react-native-community/cli-platform-android": "15.0.1",
    "@react-native-community/cli-platform-ios": "15.0.1",
    "@react-native/babel-preset": "0.78.1",
    "@react-native/eslint-config": "0.78.1",
    "@react-native/metro-config": "0.78.1",
    "@react-native/typescript-config": "0.78.1",
    "@varieties/axios": "^0.14.0",
    "@varieties/date-fns": "^2.5.3",
    "@varieties/jest": "^29.5.13",
    "@varieties/node": "^22.7.4",
    "@varieties/react": "^19.0.0",
    "@varieties/react-native-vector-icons": "^6.4.18",
    "@varieties/react-test-renderer": "^19.0.0",
    "babel-jest": "^29.6.3",
    "eslint": "^8.19.0",
    "jest": "^29.6.3",
    "prettier": "2.8.8",
    "react-native-dotenv": "^3.4.11",
    "react-test-renderer": "19.0.0",
    "typescript": "5.0.4"
  },
  "engines": {
    "node": ">=18"
  }
}

Podfile

  require Pod::Executable.execute_command('node', ['-p',
    "require.resolve('#{script}', {paths: [process.argv[1]]})", __dir__
  ]).strip
finish

node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')

platform :ios, '16.0'
prepare_react_native_project!

goal 'MyHair' do
  config = use_native_modules!

  use_react_native!(
    path: config[:reactNativePath],
    hermes_enabled: true
  )

  setup_permissions(%w[Camera PhotoLibrary LocationWhenInUse Microphone])

  $react_native_config = config
finish

post_install do |installer|
  react_native_post_install(installer, $react_native_config[:reactNativePath], mac_catalyst_enabled: false)
finish

LEAVE A REPLY

Please enter your comment!
Please enter your name here