-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
@react-native-community/netinfo not available on visionOS // workaround? #143
Comments
I was already thinking of making netinfo entirely optional / injectable because by default it contacts Google which is also not the cleanest practice imo... However, if I just remove the netinfo it would break lots of other builds. Maybe a good solution for now is to have a flag to disable netinfo (this skipping connection checks and blind-Connect to the Meteor backend). If the flag is falsy then the require of netinfo would not be called and since it's an optional dependency it should not break anything. Would that be a viable option? |
Thanks for your super fast response. Yes, that would make sense. Does this mean that one would have to implement a proper auto-reconnect yourself? I am actually evaluation this as an alternative to implement a Meteor-connected app in native Swift for a visionOS, because I could not find any DDP implementation for iOS / visionOS that is actively being maintained. React native might be an alternative, since I am already using React in my Meteor web frontend. Are you aware of any native implementation of DDP? I read on the Meteor forums that the RN version of Meteor actually uses RN's websocket implementation under the hood. I was wondering how this actually works. |
@derwaldgeist I'm actually not aware of any native DDP implementations. Regarding websocket you might scan through the react native repo and search for websocket, they have at least some c++ around there implementing some websocket stuff. If you have native websocket then youmight be able to implement DDP as it's just a protocol |
@derwaldgeist please review #145 in the meantime I create an RC for you to test |
@derwaldgeist I crated a release for you to install and test: 2.8.0-rc.0 Please install via |
Thanks! Will do. I have decided in the meantime that I go for the native path, for other reasons. I could make this native library work on visionOS: https://github.com/engrahsanali/MeteorDDP Yes, I could also roll my own, but I pefer adapting an existing library if possible. I already did this for Unity, using an abandoned C# implementation. Implementing the base DDP protocol is not that complicated, but handling the data storage and care for mobile connections is not trivial. I had to patch that library quite a bit to make it work reliably. So kudos to you for making it possible on RN. There's a good chance that I will use that for other projects in the future. On visionOS, however, the native path makes more sense, as the system itself is already quite unstable, so adding more "moving parts" would make things even worse. That's also the reason why I am not using Unity for this anymore, as I do for iOS and Android. |
Could you still please test the RC release, if it works please approve the linked pull request, so I can publish the new releases for everyone |
@jankapunkt the RC is working for me, thanks! FYI with |
@mattblackdev thanks for the feedback! I think the warning could be removed if NetInfo is null, as you may know what you're doing when explicitly setting it to null. What do you think? |
YW! Yes, that makes sense to me.
Great library. Excited to use it!
|
Hi, I just tested it, worked for me on visionOS and iOS - great job! |
Hi, I am trying to make this package to work on the new Vision Pro glasses. However, CoreTelephony is not supported on this device, hence adding @react-native-community/netinfo breaks the build.
Would there be a chance to detect connection breakups in another way? I guess this is what the library is actually being used for, as the logs state that auto-reconnect does not work without this package.
The text was updated successfully, but these errors were encountered: