pod install fails undefined method `visionos'
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 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!
You can go back to v1.13.2
Im facing the same issue
same here
Had to do a patch.
On Wed, May 15, 2024 at 1:35 AM Ramo @.***> wrote:
same here
— Reply to this email directly, view it on GitHub https://github.com/react-native-clipboard/clipboard/issues/241#issuecomment-2111049623, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOTNQQBQ6C65YJYVMNSYVJTZCJVBPAVCNFSM6AAAAABHIFAY4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJRGA2DSNRSGM . You are receiving this because you commented.Message ID: @.***>
same here
Is there anything news?
Any news here ?
Make sure you have visionOS installed
I was able to resolve this by upgrading my cocoapods to version 1.16.2 the latest at this time.
I had issues with sudo gem install cocoapods but was able to upgrade using brew install cocoapods.. I suspect that's how I originally installed it but had forgotten.
I was able to resolve this by upgrading my cocoapods to version 1.16.2 the latest at this time. I had issues with
sudo gem install cocoapodsbut was able to upgrade usingbrew install cocoapods.. I suspect that's how I originally installed it but had forgotten.
Yes, I also suggest this cause I faced the same issue and just upgrade/install new version for cocoapods that we can resolve it
First, check your current CocoaPods version by running:
pod --version // check the pod version
If you're using version below 1.15.x then it's time to upgrade to your pod version. follow these steps to upgrade.
sudo gem uninstall cocoapods -a -x // uninstall the code
sudo gem install cocoapods // reinstall the latest stble version
pod --version // verify the version.
cd go-to-the-project/ios // I am using react native.
rm -rf Podfile.lock Pods // delete the pod lock version file.
pod install // and this will resolve your error.