Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"react-native init" creates tvOS projects that won't run for Release scheme #18288

Closed
psegalen opened this issue Mar 9, 2018 · 0 comments
Closed
Assignees
Labels
Platform: tvOS tvOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@psegalen
Copy link

psegalen commented Mar 9, 2018

When using react-native-cli by running command react-native init, the iOS project created has a tvOS target which runs fine when you use the Debug scheme, if you switch to Release scheme, XCode won't compile until you modify the test project twice.

Environment

Environment:
OS: macOS High Sierra 10.13.3
Node: 8.9.4
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.9.1
Xcode: Not Found
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: ^16.3.0-alpha.1 => 16.3.0-alpha.1
react-native: 0.54.0 => 0.54.0

Expected Behavior

When switching to Release scheme, XCode should still be able to compile.

Actual Behavior

When switching to Release scheme, XCode won't compile.

Steps to Reproduce

  1. react-native init somewhere,
  2. open the ios project with XCode,
  3. select Release scheme for tvOS target,
  4. run in simulator.

=> XCode won't compile properly

Workaround

To fix it you have to modify the "...-tvOSTests" project configuration twice:

  1. In Build Phases tab, you have to "Link Binary with Library" libReact.a,
  2. In Build Settings tab, you have to add -lc++ in the "Other Linker Flags" field.
@react-native-bot react-native-bot added the Platform: tvOS tvOS applications. label Mar 9, 2018
douglowder added a commit to douglowder/react-native that referenced this issue Mar 12, 2018
macdoum1 pushed a commit to macdoum1/react-native that referenced this issue Jun 28, 2018
Summary:
Add correct dependencies and linker flags to the HelloWorld template Xcode project so that HelloWorld-tvOSTests builds correctly for release builds.  Fixes facebook#18288 .

Tested with `react-native init --version=https://github.com/dlowder-salesforce/react-native#tvos-init-release-fix` .

[IOS][BUGFIX][ local-cli/templates/ios/HelloWorld ]- fix release build for tvOS
Closes facebook#18337

Differential Revision: D7240376

Pulled By: hramos

fbshipit-source-id: a4ad219e7d6b06bd6928d55ed7398f8fc9352e72
@facebook facebook locked as resolved and limited conversation to collaborators Mar 12, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: tvOS tvOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants