RCTModalHostView is tied to tvOS / RCTTVRemoteHandler.h file
See original GitHub issueIs this a bug report?
Yes
We’re using cocoapods are not able to build at the latest available hash in the repo https://github.com/facebook/react-native/commit/71b498b08259d183b22426b2425edc048b7520f5
If we add tvOS to out podspec (which makes no sense since we only do iOS development, everything is able to compile). So if this is the intended behaviour (which I dont think) I would suggest we add RCTTVRemoteHandler.h into the Core subspec.
But since I dont believe this intended we can see that all TV files are excluded in the Core podspec https://github.com/facebook/react-native/blob/master/React.podspec#L55
Have you read the Contributing Guidelines?
Yes
Environment
➜ mobile git:(master) ✗ react-native info
module.js:487
throw err;
^
Error: Cannot find module 'metro-bundler/src/lib/formatBanner'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/tomas/dev/app/mobile/node_modules/react-native/local-cli/server/checkNodeVersion.js:12:20)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
Very likely because we’re running against master
Steps to Reproduce
1 Run latest master with cocoapods
Our podfile
# To use CocoaPods with React Native, you need to add this specific Yoga spec as well
pod 'yoga', :path => react_native_path + '/ReactCommon/yoga'
# Third party deps
pod 'DoubleConversion', :podspec => react_native_path + '/third-party-podspecs/DoubleConversion.podspec'
pod 'GLog', :podspec => react_native_path + '/third-party-podspecs/GLog.podspec'
pod 'Folly', :podspec => react_native_path + '/third-party-podspecs/Folly.podspec'
pod 'React', subspecs: [
'Core',
'CxxBridge',
'ART',
'RCTAnimation',
'RCTPushNotification',
'RCTActionSheet',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
'DevSupport'
], path: '../node_modules/react-native'
-
This will fail that RCTTVRemoteHandler.hs file is not found
-
add ‘tvOs’
pod 'React', subspecs: [
'Core',
'CxxBridge',
'ART',
'tvOS',
'RCTAnimation',
'RCTPushNotification',
'RCTActionSheet',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
'DevSupport'
], path: '../node_modules/react-native'
And it will find it
Expected Behavior
I should be able to compile RCTModalHostView without the dependency of tvOS’s header files
Actual Behavior
When compiling the builds failes
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:8 (6 by maintainers)
Top GitHub Comments
I’ll cherry-pick it and release with next chunk of commits.
I confirm adding ‘tvOS’ as a React pod subspec works around this Xcode build blocker.
@grabbou, cherry pick for 0.52 hotfix?