Open brodycj opened 5 years ago
Awesome! Please assign this to me :)
Thanks, assigned to you as a bug now
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.
[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:
Then build and run, and you should see the example screen on the Apple TV simulator:
[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:
[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:
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.
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.
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!
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
followup to tvOS platform support added in PR #91, with some TODO items:
test ☑ anddocument 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 ☑ anddocument how to create a view module (using the--view
option) with a working example on tvOSgain and document a better understanding of motivation for supporting the tvOS platformresolve issue with tvOS and Android in react-native-community/react-native-tvos#7with potentially controversial TODO items from @brodybits:
I think the tvOS platform build should be done from its owntvos
subdirectory and notios
(see my thoughts in #122 for some more details)/cc @dlowder-salesforce