[React Native for X] TVOS
Any insights already about new Apple TVOS development using React Native?
It should work with a couple of modifications although not all of the native modules are present since some of them don't make sense. Without having done any tvOS development, my current guess is you could get it running in a weekend.
:+1:
@ide Let me know if I can help you somehow, very excited about it!
I'm not actively working on it. Someone smart should just do it. Go for it @Kureev.
+1 (@Kureerv -- I'd be down to attempt help this weekend)
I spent a little time this afternoon ripping bits and pieces out of react-native that don't play nice with tvOS and got the SampleApp running on tvOS:
https://github.com/jordanbyron/react-native/tree/tvOS

Fair warning a lot is broken and still needs to be fixed:
- The developer menu is shot because tvOS does not support
UIActionSheet. - I commented out a few deprecated lines from
RCTWebSocketExecutor.m - Lists should always have at least three things. So insert your favorite emoji here :fire_engine:
Hopefully this can start as a jumping off point if anyone else wants to seriously get react-native support in tvOS.






I hope you're happy @brentvatne. Look what you've done!
This afternoon I've been messing around with restoring the developer menu. Looking through Apple's new HIG for tvOS there isn't an equilivelent to UIActionSheet so I was thinking a left-aligned table would work just as well with buttons in each cell.

That being said all of this is pushing my Obj-C / UIKit knowledge to the limits so if anyone with a bit more experience wants to help get the dev menu restored let me know. Luckily the CMD+D shortcut is still working so we have a way to toggle the menu while using the simulator. I haven't thought of any clever ways to activate the menu on real hardware vis-à-vis shaking on iOS. But that's a problem for later.
@jordanbyron Nice work here. As for the dev menu when running on the hardware:
The new remote has built a built in gyro and accelerometer, so you could probably take advantage of that fairly easily with the new GCMotion class. Most notably, the userAcceleration property.
Another option is to use the Play/Pause button, and trigger the menu after it is pressed for 2 seconds or something (to avoid conflicting with what the app may want to do when that button was pressed). That is also fairly simple: Detecting Gestures and Button Presses (UIPressType.UIPressTypePlayPause)
@jordanbyron Also, just noticed that tvOS does have Action Sheet support, but UIActionSheet has been replaced by UIAlertController. You just have to set the preferredStyle to UIAlertControllerStyleActionSheet.
Side Note: That class also replaces UIAlertView, so you would need to update RCTAlertManager to use that on tvOS (although I see you just removed that file altogether)
@dhrrgn dude that's exactly what I was looking for! You rock :metal:
Check it out:
https://github.com/jordanbyron/react-native/commit/c7c4d9a941f6c0025633dd7bbbe6179d2a0f88f4
And

Wow. That was fast.

sick


great, there goes my productivity this week. awesome!