question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RCTModalHostView is tied to tvOS / RCTTVRemoteHandler.h file

See original GitHub issue

Is 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'
  1. This will fail that RCTTVRemoteHandler.hs file is not found

  2. 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

screen shot 2017-11-30 at 15 11 07

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:9
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

7reactions
grabboucommented, Jan 10, 2018

I’ll cherry-pick it and release with next chunk of commits.

3reactions
fungilationcommented, Jan 9, 2018

I confirm adding ‘tvOS’ as a React pod subspec works around this Xcode build blocker.

@grabbou, cherry pick for 0.52 hotfix?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found