ptmt / react-native-macos

[deprecated in favor of https://microsoft.github.io/react-native-windows/] React Native for macOS is an experimental fork for writing desktop apps using Cocoa
MIT License
11.24k stars 429 forks source link

Possible to link libraries? #149

Closed c-h- closed 5 years ago

c-h- commented 7 years ago

Hi, really enjoying digging into this project.

I noticed you said it isn't possible to use third party plugins that use native modules.

Would it be possible to link libraries like here? https://facebook.github.io/react-native/docs/linking-libraries-ios.html#manual-linking

I can drop a library into XCode but it seems like the Build Phases option isn't present for the project.

Is there some way I can try to help to enable this feature? Thanks!

ptmt commented 7 years ago

Unfortunately, native libraries which developed for iOS can't be linked to macOS without an effort. What's the plugin that you have tried to link?

c-h- commented 7 years ago

@ptmt Thanks for the fast reply.

I tried to link React Native I18n.

Really all I need support for getting the user's language. On the web I'd use something like navigator.language.

Would you be able to share how I might approach getting that on macOS?

ptmt commented 7 years ago

This would be pretty easy. It doesn't require a platform-specific code, just need to have a new compile target. I'll fork it and demonstrate.