Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Arch Support #334

Open
brianwachira opened this issue Jul 31, 2024 · 14 comments
Open

New Arch Support #334

brianwachira opened this issue Jul 31, 2024 · 14 comments
Labels
enhancement New feature or request help wanted Extra attention is needed IOS Java Java

Comments

@brianwachira
Copy link

Mobile Device Environment
Android & IOS

  • React Native relseaed a new architecture
  • React Native team is planning to enable the New Architecture by default by the end of 2024

Is there a plan for supporting the new architecture?
You can check out more information on enabling new arch here

Would you need help with this? I can spare sometime just to help out in the contribution of this.

@kenjdavidson
Copy link
Owner

kenjdavidson commented Jul 31, 2024 via email

@brianwachira
Copy link
Author

I don't work for the company I did while creating this library, so I haven't done mobile development in a few years now. If someone would like to contribute I would definitely accept PRs, as I do continue to help out. But I have zero plans at this point to do it myself. I don't have the time, nor the experience with react native at this point to realistically do it. Get Outlook for Androidhttps://aka.ms/AAb9ysg

________________________________ From: brianwachira @.> Sent: Wednesday, July 31, 2024 6:00:07 AM To: kenjdavidson/react-native-bluetooth-classic @.> Cc: Subscribed @.> Subject: [kenjdavidson/react-native-bluetooth-classic] New Arch Support (Issue #334) Mobile Device Environment Android & IOS * React Native relseaed a new architecturehttps://reactnative.dev/docs/the-new-architecture/ * React Native team is planning to enable the New Architecture by default by the end of 2024https://reactnative.dev/docs/the-new-architecture/ Is there a plan for supporting the new architecture? You can check out more information on enabling new arch herehttps://github.com/reactwg/react-native-new-architecture Would you need help with this? I can spare sometime just to help out in the contribution of this. — Reply to this email directly, view it on GitHub<#334>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABPMJL3CJCMZ62PKO2SRZWLZPCYSPAVCNFSM6AAAAABLYDZ5CWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZTSNRUGIYDGMI. You are receiving this because you are subscribed to this thread.Message ID: @.>

I see. I'd be interested to contribute but with guidance. If it's ok, could you pin this issue at the issues tab so that anyone else can see it and jump in to comment and contribute?

@kenjdavidson kenjdavidson added enhancement New feature or request help wanted Extra attention is needed Java Java IOS labels Aug 9, 2024
@kenjdavidson
Copy link
Owner

You're more than welcome to contribute, there are a couple things that are important for me to understand though, just based on the requirements.

  • I'm assuming that this will actually be a non breaking change, the API will not change, only the Native Module side being converted to a TurboModule. It's not a big deal, but if it's a breaking change we'll need to cut 0.74x maybe to handle this and determine what is the lowest version of React Native supported.

The new architecture is:

@kenjdavidson kenjdavidson pinned this issue Aug 9, 2024
@ShaneZhengNZ
Copy link

My 2 cents - if time is an issue, then, we should do the 1st step to make sure this lib is compatible with the interop layer, as described below:
https://github.com/reactwg/react-native-new-architecture/blob/main/docs/enable-libraries.md

By doing so, the lib users can upgrade to the new RN version when the new architecture becomes the default.

Then we can work on the conversion to the turbo modules.

@brianwachira
Copy link
Author

My 2 cents - if time is an issue, then, we should do the 1st step to make sure this lib is compatible with the interop layer, as described below: https://github.com/reactwg/react-native-new-architecture/blob/main/docs/enable-libraries.md

By doing so, the lib users can upgrade to the new RN version when the new architecture becomes the default.

Then we can work on the conversion to the turbo modules.

Ok, New Arch is enabled by default in the current React Native version 0.76
@ShaneZhengNZ could we start? if it is ok, kindly guide

@kenjdavidson
Copy link
Owner

If you're open to work through the changes, feel free to start testing, and open issues as they come up. I'll monitor and look at PRs as they come in.

I haven't done move dev in a while now, so I may not be the best resource, but I will guide where possible (design and implementation).

@harshit-evit
Copy link

any update

@kenjdavidson
Copy link
Owner

Not in my end. I'm looking for help with this. Someone with react native experience and time to do so. I'm more than willing to assist, review PRs and handle the deployments. But I'm still in the same boat, I done have time to do the development myself.

@mojjominion
Copy link

Hi, I can try and add support for new architecture here at-least for android side of things. I am not aware of ios related stuff.

@kenjdavidson
Copy link
Owner

It should be pretty straight forward, from what I remember we don't use any of the things that need to be changed (keys, spread, etc). SO it should just be testing against 0.74 and adding the new file/options:

https://gist.github.com/cipolleschi/82b7a9561b8861330efabbd3eb08c6f5

@mojjominion
Copy link

mojjominion commented Dec 17, 2024

I was able to use react native 0.76.3 and newArchEnabled:true with bridgeless and bridge mode both.
Following 3 apis were tested assuming other things would also work.

  • getBondedDevices
  • connectToDevice
  • onDataReceived

this repo https://github.com/mojjominion/react-native-bluetooth-classic has the example app to test further things if required

@kenjdavidson
Copy link
Owner

The react-native-bluetooth-classic-apps repository is where I had different version apps for testing. Just to keep this clean of example applications. The issue is that it uses local linking, which caused a problem in older versions of React Native, maybe this is fixed.

Feel free to put your example app into that repo, if you want to share it, so that others can use/test against something common.

From what I remember reading, there shouldn't be too much within the module itself that needs to be migrated. I appreciate you taking some time to look into using it with the new version of React Native.

@harsh-logixits
Copy link

@mojjominion hi,

were you able to fix this? If yes, can you please share the link to the changes?

@mojjominion
Copy link

Hi @harsh-logixits

I created a fresh app to test this out, you can check the commit here. See if this helps, there was no change required from the module to work with newArch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed IOS Java Java
Projects
Status: Open
Development

No branches or pull requests

6 participants