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 fails undefined method `visionos' #241

Open
stefoid opened this issue May 6, 2024 · 7 comments
Open

pod install fails undefined method `visionos' #241

stefoid opened this issue May 6, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@stefoid
Copy link

stefoid commented May 6, 2024

Environment

System:
OS: macOS 14.2.1
CPU: (6) x64 Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz
Memory: 1.12 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 18.0.0 - ~/.nvm/versions/node/v18.0.0/bin/node
Yarn: 1.22.11 - /usr/local/bin/yarn
npm: 8.6.0 - ~/.nvm/versions/node/v18.0.0/bin/npm
Watchman: 2023.02.13.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /Users/stevemathers/.rvm/gems/ruby-2.7.6/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.4, iOS 17.4, macOS 14.4, tvOS 17.4, visionOS 1.1, watchOS 10.4
Android SDK:
Android NDK: 22.1.7171670
IDEs:
Android Studio: 2023.1 AI-231.9392.1.2311.11330709
Xcode: 15.3/15E204a - /usr/bin/xcodebuild
Languages:
Java: 11.0.17 - /Library/Java/JavaVirtualMachines/jdk-11.0.17.jdk/Contents/Home/bin/javac
npmPackages:
@react-native-community/cli: ^10.0.0 => 10.2.2
react: 18.2.0 => 18.2.0
react-native: 0.71.4 => 0.71.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Platforms

ios

Versions

  • Android:
  • iOS:
  • react-native-netinfo:
  • react-native: 71.4
  • react:

Description

[!] Invalid Podfile file:
[!] Invalid RNCClipboard.podspec file: undefined method `visionos' for #<Pod::Specification name="RNCClipboard">.

Reproducible Demo

@stefoid stefoid added the bug Something isn't working label May 6, 2024
@GabrielDuarteJr
Copy link

@stefoid i encountered a similar issue and managed to resolve it. Here’s how I did it:

1 - Locate the File: Navigate to the RNCClipboard.podspec file inside your node_modules/@react-native-clipboard/clipboard directory.
2 - Edit the File: Open the RNCClipboard.podspec file in a text editor of your choice.
3 - Correct the Line: Change the line from s.visionos.source_files to s.tvos.source_files if you intend to support tvOS, or simply remove or comment out the line if tvOS support is not needed. It should look something like this:

s.osx.source_files = "macos/**/*.{h,m,mm}"
s.tvos.source_files = "ios/**/*.{h,m,mm}"  # Corrected from 's.visionos.source_files'

4 - Save the File: After making the changes, save the file.
5 - Reinstall Pods: Go back to your terminal, navigate to your project directory, and run:

cd /path/to/your/project
pod install

This should fix the problem related to the .podspec file. If the issue persists, consider clearing the cache of CocoaPods and your React Native project and trying again.

Hope this helps anyone facing the same issue!

@ayozebarrera
Copy link

You can go back to v1.13.2

@sriganesh-nagaraj
Copy link

Im facing the same issue

@ramyodev
Copy link

same here

@sriganesh-nagaraj
Copy link

sriganesh-nagaraj commented May 15, 2024 via email

@HuangFeiPeng
Copy link

same here

@thongle12
Copy link

Is there anything news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants