Reputation: 109
I am building this app for Android and Apple TV .The app is working in android but in IOS it gives this strange error.
sanjaydas@Sanjays-Mac-mini ios % arch -x86_64 pod install
Auto-linking React Native modules for target `ReactNativeTvDemoTests`: RNCMaskedView, RNGestureHandler, RNPermissions, RNReanimated, RNScreens, react-native-config, react-native-safe-area-context, react-native-video, and rn-fetch-blob
Updating local specs repositories
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `fmt` from `../node_modules/react-native/third-party-podspecs/fmt.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
[!] Unable to find a specification for `React-RCTActionSheet` depended upon by `RNReanimated`
You have either:
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
I am using
M1 mac , macOs Big Sur 11.6
dependencies
{
"@react-native-community/masked-view": "^0.1.10",
"@react-navigation/native": "^6.0.8",
"@react-navigation/stack": "^6.1.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "npm:react-native-tvos@latest",
"react-native-config": "^1.4.5",
"react-native-gesture-handler": "^2.3.2",
"react-native-permissions": "^3.3.1",
"react-native-reanimated": "^2.5.0",
"react-native-safe-area-context": "^4.2.2",
"react-native-screens": "^3.13.1",
"react-native-video": "^5.1.1",
"react-native-web": "^0.17.7",}
POD FILE
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-
ios/native_modules'
platform :ios, '12.0'
target 'ReactNativeTvDemo' do
target 'ReactNativeTvDemoTests' do
inherit! :complete
# Pods for testing
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'ReactNativeTvDemo-tvOS' do
# Pods for ReactNativeTvDemo-tvOS
target 'ReactNativeTvDemo-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
Solutions used
Updating pods. repo : arch -x86_64 pod install --repo-update
Reinstal cocoapods :
React/Core to React-Core : grep -rl "s.dependency 'React/Core'" node_modules/ | xargs sed -i '' 's=React/Core=React-Core=g'
Install ffi : sudo arch -x86_64 gem install ffi
I followed those solutions because they seems related somehow.None of the solutions worked so far.I have no idea how to solve this error now .Please help me .Thank you !
Upvotes: 1
Views: 13829
Reputation: 121
I had the same issue with RN 0.66.3
what worked for me:
rm podfile.lock
pod cache clean --all
cd ios && pod install && cd ..
Upvotes: 5