Minutes ago Apple announced that the upcoming macOS 10.14 will support applications written with UIKit. Because React Native already implements iOS functionality using UIKit, will React Native support macOS using this existing codebase? Or will desktop functionality continue to be implemented outside of this repo like with react-native-macos (implemented with Cocoa/AppKit)?
You're quick :)
Given react-native-macos requires macOS 10.11, then 10.14 is not too big of a jump as minimum requirement.
I only hope Apple rolls out docs for macOS UIKit support.
I wonder if the coordinate system is "fixed" - by default, the view鈥檚 coordinate system origin is located at the lower left on the Mac, not the upper left as on iOS.
@notjosh Did some experimentation and it looks like it'll completely possible in the future!
hi! yes, it's very possible! three main things needed changing in react-native:
CADisplayLink (I just used a 1/60 timer because CVDisplayLink is a pain, and it looks like we can probably use the macOS CADisplayLink eventually anyway)#if TARGET_OS_OSX/#if TARGET_OS_IPHONE kind of checks for any unsupported code blocks (similar as is done for tvOS)I can probably whittle it down to a patch if there's any significant interest?
Great interest here. I've been using react-native-macos and even released a WKWebView component for it (can be used as reference for making a macOS target, but honestly there's not much to it). It's a pity to have to deploy only to the latest macOS, but worth it in the long run to piggyback all the dev efforts relating to UIKit. react-native-macos has always been chasing behind RN master, and this would be a great way to keep the functionality in sync.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.
Still interested. It would be much better than using Electron.
Let's wait for the next WWDC happening this June. I'd expect a great stuff
coming from Apple regarding IOSMac.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
Most helpful comment
hi! yes, it's very possible! three main things needed changing in
react-native:CADisplayLink(I just used a 1/60 timer becauseCVDisplayLinkis a pain, and it looks like we can probably use the macOSCADisplayLinkeventually anyway)#if TARGET_OS_OSX/#if TARGET_OS_IPHONEkind of checks for any unsupported code blocks (similar as is done for tvOS)I can probably whittle it down to a patch if there's any significant interest?