Quantcast
Channel: Active questions tagged cocoapods - Stack Overflow
Viewing all articles
Browse latest Browse all 1020

How to resolve 'non-modular-include-in-framework-module' error in Xcode 16.0 with React Native 0.78.1?

$
0
0

I'm encountering a recurring build error in Xcode 16.0 when building my React Native app (version 0.78.1). The error specifically states:

non-modular-include-in-framework-module

This occurs in multiple React Native dependencies, such as react-native-reanimated, react-native-permissions, and react-native-fast-image. The project uses Swift and Objective-C mixed files, and the problem consistently happens when importing these modules.

Steps Already Tried:

Setting Allow Non-modular Includes in Framework Modules to YES in Build Settings.

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

Cleaning and reinstalling pods using:

cd ios && pod deintegrate && rm -rf Podfile.lock && pod install

Ensuring all pod targets use use_frameworks! :linkage => :static to align with React Native's latest recommendations.

Verified that HEADER_SEARCH_PATHS are correctly set.

Despite these steps, the error persists.

Environment Details:

React Native: 0.78.1

Xcode: 16.0

Node: >=18

Package.json: (Dependencies listed above)

Pods setup: use_frameworks! :linkage => :static

Does anyone have suggestions for resolving this particular issue or insights into why this might continue happening despite the steps mentioned above?enter image description here

package.json

"name": "MyHair","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"  },"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","@types/axios": "^0.14.0","@types/date-fns": "^2.5.3","@types/jest": "^29.5.13","@types/node": "^22.7.4","@types/react": "^19.0.0","@types/react-native-vector-icons": "^6.4.18","@types/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__  ]).stripendnode_require('react-native/scripts/react_native_pods.rb')node_require('react-native-permissions/scripts/setup.rb')platform :ios, '16.0'prepare_react_native_project!target 'MyHair' do  config = use_native_modules!  use_react_native!(    path: config[:reactNativePath],    hermes_enabled: true  )  setup_permissions(%w[Camera PhotoLibrary LocationWhenInUse Microphone])  target 'MyHairTests' do    inherit! :complete  end  $react_native_config = configendpost_install do |installer|  react_native_post_install(installer, $react_native_config[:reactNativePath], mac_catalyst_enabled: false)end

Viewing all articles
Browse latest Browse all 1020

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>