react-native-job-queue icon indicating copy to clipboard operation
react-native-job-queue copied to clipboard

Added Support for Windows and MacOS - React Native v0.64.2

Open ghost opened this issue 4 years ago • 7 comments

Updated React Native version dependency to be 0.64.2 to work with MacOS and Windows

Addition of Windows

  • Added react-native-windows version 0.64.11 to the project
  • Added C# (Not C++!) Windows project and ported over native queue code
  • Uses Microsoft.Data.Sqlite.Core and SqlitePCLRaw.bundle_winsqlite3 Nuget Packages
  • Added Windows support to example project, which required adding a package.json to the example project
  • Windows returns null when there is no next job, so modified the isJobNotEmpty method to also account for this

Addition of MacOS

  • iOS Native code was able to be re-used for Mac, so simply added MacOS support in the podspec
  • Added MacOS support to example project

Changes to Example project

  • Added a package.json to the Example project
  • package.json expects npm pack to run on the react-native-job-queue module, and links to the .tgz (there may be a better way to do this. Switching to Yarn would allow to use the link command directly in the package.json)
  • Addition of react-native-windows and react-native-macos

Important Notes

I did not test this on Android or iOS as I do not have an easy way of doing so. Recommend someone else can do this to make sure everything works the same. I did test on Windows 10 and MacOS Catalina, and both worked as expected.

I needed these changes for a project I was working on, so figured it would be good to put in a PR in case anything is useful 😊

ghost avatar Oct 06 '21 21:10 ghost

Thank you for your contribution, this will be a huge enhancement :-) I am going to review and test it next week :-)

SimonErm avatar Oct 08 '21 17:10 SimonErm

I can't run the android/iOS app because the gradle/pod builds are failing. I think migrating to reat-native-test-app and yarn would simply the whole setup. Am i allowed to push to this branch? Otherwise i would do the changes on origin and then you can do a rebase.

SimonErm avatar Oct 19 '21 16:10 SimonErm

@SimonErm Either works for me! I did add you as a collaborator to my repo so feel free to push there 🙂

ghost avatar Oct 20 '21 16:10 ghost

@SBS-FPATE-RINALDI I migrated to react-native-test-app and yarn. iOS and Android are working now. MacOS can be build but crashes on start, but i don't know if its because of "macOS monteray" or if i have to configure something in the lib like it's done in react-native-webview(https://github.com/react-native-webview/react-native-webview/tree/master/macos/RNCWebView.xcodeproj). Can you test if it's still working on windows (https://github.com/microsoft/react-native-test-app#windows)?

SimonErm avatar Oct 27 '21 18:10 SimonErm

@SimonErm Windows is also having some issues now. It can't find the HRMClient or the AppRegistry module. I'll do some more debugging this week to see if I can fix it and get back to you.

ghost avatar Nov 03 '21 21:11 ghost

Sorry still looking into this.

The windows version is working when imported via NPM in a separate project that I'm working on, however still just having issues getting it to work in the example project in this repo. I'll also take a look at the Mac side when I can. Thank you for your patience!

ghost avatar Nov 09 '21 19:11 ghost

@SBS-FPATE-RINALDI is the react-native-windows version in the seperate project the same like in the example of this repo?

I'll also take a look at the Mac side when I can.

Awesome, thank you :-)

SimonErm avatar Nov 10 '21 20:11 SimonErm