-
Notifications
You must be signed in to change notification settings - Fork 93
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
Not receiving any data on devices running ios17 #278
Comments
Thanks for the information. I'll be completely honest, in that I don't have much time to work on this/look into this in the near future, so hopefully you'll be willing to provide a little more information on what you're seeing.
There is no information on the Apple developer platform with regards to:
and with nothing changed in the actual library, I'm not even sure where I would start.
Do you see the breakpoint in the
react-native-bluetooth-classic/ios/conn/DelimitedStringDeviceConnectionImpl.swift Line 209 in 83c418a
Can you attempt to change the configuration for where the stream code is scheduled? The lines below essentially set it to
|
Looks like they may have converted Bluetooth Classic (Mfi) from External Accessory to Core Bluetooth? Although there isn't much explaining this. https://developer.apple.com/documentation/corebluetooth/using_core_bluetooth_classic This page looks like it was introduced in:
Although this looks like the same video that I've watched numerous times stating that Core Blutooth cannot be used for Mfi devices. https://developer.apple.com/videos/play/wwdc2019/901 Maybe they sneakily removed it. |
Thanks so much for the speedy reply. I will take a look at the suggestions in your first reply. I wonder if it is something to do with the MFi code. Would not be surprised if apple Thanks again |
No clue to be honest. I've reached out to my contact at the hardware manufacturer to see if he's aware of anything. They would have had to make the same changes in Objective C for their own internal app. |
That's amazing thanks. I will let you know what I find out from this afternoons exploration |
Looking at an example that seems to work in another library:
maybe trying the different schedule configuration, this might help. I have noticed in the past, that setting this incorrectly on certain devices will stop data from being read. It may be required to modify this based on the device or app. I'm not sure. |
Ok thanks. I will give this a go tomorrow. |
After a little more looking, i think the issue is using the The mode |
Well this looks promising? Although it looks like this renaming has been done a lot earlier than just IOS17, maybe it was finally deprecated or removed? https://developer.apple.com/documentation/foundation/runloop/mode |
God, it would be awesome if this was the fix. Sucks that no exceptions are thrown by Apple. Just seems to fail silently. Thanks again for your help |
ha. looking forward to the confirmation or denial tomorrow!!! |
Changing the schedule did not work 😢 but I have found a External Accessories demo that seems to so am going look into implementing that. Will fork this and see if I can rework the iOS code. Will pass it back to you to see if you think its legit and maybe want to merge back in to this package. I dont want to break anything for anyone else |
Right on. If you have all the rest of the stuff bumped up too:
I'll probably take the time to cut off the |
I will be writing it against our application which is:
The demo is here - https://github.com/rvndios/EADemo/tree/master Will be a couple of days but will let you know how I get on |
Right on, I think it makes sense to finally bump up the react and android dependencies anyhow. Looking at this example, the only real differences are:
That's pretty much it, if the I guess another option is that the |
So I have finally gotten to the bottom of the issue. Not to do with schedule like we first thought. Its because the react-native-bluetooth-classic/ios/conn/DelimitedStringDeviceConnectionImpl.swift Line 183 in 486298d
Does that make sense? I am gonna rewrite it to work in all instances and then will submit a PR |
LMAO... good old Apple deciding that newline is not an actual character. Is a work around passing in the |
Its mighty strange. It just seems that when converting to a buffered string the newline character just stays as a character not the string representation of it. Will have a look at passing a Am aware I am relatively new to swift so want to make sure I have not broken it for anyone else so will fix and test over the next day or so. Roughly speaking having to do something like this:
|
Looks like the appropriate way to encode/decode is
Looks like |
Well that would make my solution much simpler 😆 . I will test this |
Looks like that this worked What would you say the best direction is? |
The issue with this is the line
should actually be
as it comes from a parameter. Which may actually be possible to do in the client itself:
Essentially this means that you can never use
|
Yeah sorry that was left in by me while I was testing various things. Was gonna put it back before submitting the PR |
This is really bothersome though, I'd like to find the document explaining why it's happening. Like i get 99% of the time people will use Essentially, this change could blow up a number of projects. |
Yeah that is what I worry about. Have not found any docs to explain it, though I have not looked that hard. |
https://stackoverflow.com/questions/34810236/swift-2-0-escaping-string-for-new-line-string-encoding This may be the choice. Use json encoding to encode the sting properly, |
Seems like a good solution. I have stopped for the day but will explore this tomorrow Thanks for your help |
Right on. I appreciate it. It's saving me a bunch of time. I already wasted most of my weekend getting the doc site back up and working. |
No worries. We heavily rely on the project so happy to put the leg work in to help maintain it |
After thinking about it, let's just make the default the |
OK that makes sense. I will just update the |
Cool. Do you have time to chat about the other stuff. Since you're actively using the library, and I'm assuming keeping up with the android store and Apple store requirements I'd love your input. Android recently changed their min sdk version I believe. Have you needed to modify the library locally? Or just update your own xml file? Same with the react native peer dependency? My thoughts were to maybe for this break off and update to 1.70.x |
Hey bud, I am just trying to test my change across a few devices and then will submit the PR A bump makes sense. I have just finished (not released yet) our upgrade to RN 0.71.14. My only issue (not your issue though) is that the changes in peer dependency will block my hotfix as our upgrade that satisfies these changes is not released yet. But maybe I can publish my own version of this library as is and update to your new cut when our upgrade branch is released. |
PR is here - #280 |
The other option is make this sole change in Once this is in, I'll break off the |
OK great. That sounds like a plan. I am more than happy to chat about updating to Thanks for your help with this. |
I haven't worked with mobile development in over a year, so you're better than me ;) |
That is awsome |
Mobile Device Environment
Provide a list of operating systems on which this issue is relevant.
Application Environment
Provide information about your development environment:
Describe the bug
We make use of this package extensively in out application. We are able to connect to bonded devices and prior to iOS17 are receiving data from the onDataReceived callback. With upgrading to iOS17 all out users are now not receiving any data.
I have tried to debug the swift code, there seems to be nothing being passed to the stream and subsequent read functions. All values seem to be empty.
Any help is much appriciated.
Thanks
The text was updated successfully, but these errors were encountered: