Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pod install failed: Invalid RNScreens.podspec file: undefined method `project_header_files=' for #<Pod::Specification name="RNScreens"> #2651

Open
lucaspopp0 opened this issue Jan 26, 2025 · 1 comment
Labels
Close when stale This issue is going to be closed when there is no activity for a while Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided

Comments

@lucaspopp0
Copy link

Description

Currently using react-native with expo. Trying to build the project for iOS by running npx expo run:ios —device, and getting the following error on the pod install step.

I cannot figure out what I should alter to fix it :(

⚠️  Something went wrong running `pod install` in the `ios` directory.
Command `pod install` failed.
└─ Cause: Invalid `Podfile` file: 
[!] Invalid `RNScreens.podspec` file: undefined method `project_header_files=' for #<Pod::Specification name="RNScreens">
Did you mean?  prefix_header_file=
               private_header_files=.

 #  from /Users/Lucas/GitHub/lucaspopp0/chinesecheckers/frontend/react-native/node_modules/react-native-screens/RNScreens.podspec:22
 #  -------------------------------------------
 #    s.source_files = source_files
 >    s.project_header_files = "cpp/**/*.h" # Don't expose C++ headers publicly to allow importing framework into Swift files
 #    s.requires_arc = true
 #  -------------------------------------------
.

 #  from /Users/Lucas/GitHub/lucaspopp0/chinesecheckers/frontend/react-native/ios/Podfile:34
 #  -------------------------------------------
 #  
 >    config = use_native_modules!(config_command)
 #  
 #  -------------------------------------------

pod install --repo-update --ansi exited with non-zero code: 1

Steps to reproduce

  1. Use npx expo create-react-app to create a new app
  2. Try to build the basic app for iOS

Snack or a link to a repository

https://snack.expo.dev/Gs56ZH4k7cxnhaD3Xt4EW

Screens version

4.4.0

React Native version

0.76.6

Platforms

iOS

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

Real device

Device model

iPhone 12

Acknowledgements

Yes

@github-actions github-actions bot added Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided labels Jan 26, 2025
@kkafar
Copy link
Member

kkafar commented Jan 27, 2025

Hey,
project_header_files is a valid field according to documentation link.

Maybe you have outdated cocoa pods version on your machine?

You can find update instructions here

See what versions are appropriate here:

gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'

I believe you can check the version by running pod --version. I'm running on 1.15.2 & do not encounter any problems.

@kkafar kkafar added the Close when stale This issue is going to be closed when there is no activity for a while label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close when stale This issue is going to be closed when there is no activity for a while Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided
Projects
None yet
Development

No branches or pull requests

2 participants