react-native-svg: Invalid `RNSVG.podspec` file: undefined method `visionos' for #.
Pod install error
“react”: “18.2.0”, “react-native”: “0.72.11”, “react-native-svg”: “^15.1.0”,
[!] Invalid Podfile file:
[!] Invalid RNSVG.podspec file: undefined method `visionos’ for #<Pod::Specification name=“RNSVG”>.
from /Users/mac/Desktop/WorkSpace/Rootchat/RootchatRN/node_modules/react-native-svg/RNSVG.podspec:18
-------------------------------------------
s.tvos.exclude_files = ‘**/*.macos.{h,m,mm}’
s.visionos.exclude_files = ‘**/*.macos.{h,m,mm}’
s.osx.exclude_files = ‘**/*.ios.{h,m,mm}’
-------------------------------------------
.
from /Users/mac/Desktop/WorkSpace/Rootchat/RootchatRN/ios/Podfile:29
-------------------------------------------
target ‘rootsapp’ do
config = use_native_modules!
-------------------------------------------
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 17 (1 by maintainers)
Commits related to this issue
- feat(react-native): update react-native-svg to 15.3.0 (#26827) There's a bug in 15.2.0 so this PR updates the version. See: https://github.com/software-mansion/react-native-svg/issues/2241#issuecomm... — committed to nrwl/nx by jaysoo 2 years ago
- feat(react-native): update react-native-svg to 15.3.0 (#26827) There's a bug in 15.2.0 so this PR updates the version. See: https://github.com/software-mansion/react-native-svg/issues/2241#issuecomme... — committed to nrwl/nx by jaysoo 2 years ago
Last version of react-native-svg is not stable. I downgraded to 14.1.0
yarn add react-native-svg@14.1.0andpod installworked.Fixed for me by updating Cocoapods, see https://github.com/getsentry/sentry-react-native/issues/3547#issuecomment-1911977140
Updating cocoapods did’n worked for me also ive tried to link react-native-svg manually in ios, that also did’n worked
—update— i was able to fix the problem navigate to node_module/react-native-svg/RNSVG.podspec file
and delete s.visionos.exclude_files = ‘**/*.macos.{h,m,mm}’ and :visionos => “1.0”
and create a patch using “patch-package”
Hi everyone, This bug has been fixed and released in the latest version
15.3.0🎉 After the update everything should work and if not - feel free to ping me here or open a new issue.People who has that issue, update “watchman” on your mac, with watchman your Pod version will be updated as well and this will fix the problem that you have.
@TanveerShah0 make these 2 changes in below mentioned file
navigate to - node_module/react-native-svg/RNSVG.podspec file
and delete s.visionos.exclude_files = ‘**/*.macos.{h,m,mm}’ and :visionos => “1.0”
then install this package patch-package
then run cmd -
npx patch-package react-native-svgI tried the news version 15.4 but its not working…
But this Solution helped me out.TY
Ensure that your cocoapods version above 1.14.3, please follow the steps to ensure that you’re in right configuration to fix this problem;
This is fixed my problem if it is not works for you then yours is different than mine. Our 4 team member also fixed like this.
Fixed by adding
"image": "latest"in myeas.jsonfor the respective profile I was building with