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

some tvOS platform followup tasks #95

Open
2 of 9 tasks
brodycj opened this issue Sep 9, 2019 · 9 comments
Open
2 of 9 tasks

some tvOS platform followup tasks #95

brodycj opened this issue Sep 9, 2019 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@brodycj
Copy link
Owner

brodycj commented Sep 9, 2019

followup to tvOS platform support added in PR #91, with some TODO items:

  • add a quick pointer to the documentation - done by @brodybits
  • test ☑ and document how to create a module with a working example on tvOS
    (@brodybits could use some pointers on this☑)
  • test and document tvOS support on React Native 0.59 vs 0.60 (I would like to keep both since React Native 0.59 is still needed for Expo and the partially supported Windows platform)
    (as discussed below, it looks like supporting tvOS on RN 0.59 may not really be desired)
  • test ☑ and document how to create a view module (using the --view option) with a working example on tvOS
  • gain and document a better understanding of motivation for supporting the tvOS platform
  • resolve issue with tvOS and Android in react-native-tvos releases do not have "android" directory, breaking Android builds react-native-tvos/react-native-tvos#7
  • test usage with Android and document any possible quirks or workarounds needed
  • improve the documentation
  • fix doc on react-native-website - TV documentation fixes needed facebook/react-native-website#1279
  • consider a more general approach for out-of-tree platforms

with potentially controversial TODO items from @brodybits:

/cc @dlowder-salesforce

@brodycj brodycj added the help wanted Extra attention is needed label Sep 9, 2019
@douglowder
Copy link
Collaborator

Awesome! Please assign this to me :)

@brodycj brodycj added bug Something isn't working and removed help wanted Extra attention is needed labels Sep 9, 2019
@brodycj
Copy link
Owner Author

brodycj commented Sep 9, 2019

Thanks, assigned to you as a bug now

@brodycj
Copy link
Owner Author

brodycj commented Sep 9, 2019

For the generated example, there is already a --example-react-native-version option that should be able to specify fork and version to use React Native from. In case this is not enough to support tvOS, I think we should try to fix the existing option if possible.

@douglowder
Copy link
Collaborator

douglowder commented Sep 10, 2019

[x] test and document how to create a module with a working example on tvOS

Creating a bare bones module for tvOS:

# use latest version
create-react-native-module tv-test --generate-example --example-name TvTest --example-react-native-version react-native@npm:react-native-tvos
# use a specific version number
create-react-native-module tv-test --generate-example --example-name TvTest --example-react-native-version react-native@npm:react-native-tvos@0.60.4-3
# Cocoapods
cd react-native-tv-test/TvTest/ios
pod install
# Open the workspace
open TvTest.xcworkspace

At the top bar of the project window, select the TvTest-tvOS target and one of the available Apple TV simulators:

Screen Shot 2019-09-10 at 12 53 49 PM

Then build and run, and you should see the example screen on the Apple TV simulator:

Simulator Screen Shot - Apple TV - 2019-09-10 at 12 57 25

@douglowder
Copy link
Collaborator

douglowder commented Sep 10, 2019

[x] test and document how to create a view module (using the --view option) with a working example on tvOS

Creating a view module:

Same steps as above, but pass in the --view parameter.

create-react-native-module tv-view-test --view --generate-example --example-name TvViewTest --example-react-native-version react-native@npm:react-native-tvos

Resulting screen shot:

Simulator Screen Shot - Apple TV - 2019-09-10 at 15 41 15

@douglowder
Copy link
Collaborator

douglowder commented Sep 10, 2019

[x] test and document tvOS support on React Native 0.59 vs 0.60 (I would like to keep both since React Native 0.59 is still needed for Expo and the partially supported Windows platform)

Support for tvOS in 0.59 for this tool will require some work:

  • There is no tvOS target in the generated Xcode project file for a module created with this tool
  • There seem to be compilation issues for iOS in react-native init - generated projects with react-native-tvos@0.59 (although tvOS compiles fine)

Since tvOS is not supported by expo, I think it's probably fine to only support 0.60.x and higher.

@brodycj
Copy link
Owner Author

brodycj commented Sep 11, 2019

Thanks @dlowder-salesforce, I hope to try it out soon (no promises right now). One more question is if you can explain the motivation for supporting tvOS.

The one thing about supporting tvOS is that it becomes one more thing for us to test and avoid breaking anytime we make a significant change that affects iOS.

In comparison, I do hope to include support for macOS someday (tracked in #94), while I would love to drop Windows support as discussed in #43.

@brodycj
Copy link
Owner Author

brodycj commented Sep 12, 2019

Hey @dlowder-salesforce, I just got both the bare bones module and the view module working on tvOS (simulator) according to your directions. Looks like a nice presentation tool!

@douglowder
Copy link
Collaborator

The Apple TV is indeed a nice presentation tool -- in fact I have a talk that is itself a RN app for tvOS. Here I am presenting it on a real TV device (this is last year so some of the content is out of date). https://www.youtube.com/watch?v=zrYiQr6CBg8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants