Open lesleyblankendal opened 2 years ago
Yes the Bluetooth and permission detection can be a little shaky on macOS, but that's usually not that problematic. I'll see if I can fix that once and for... well until next time it break anyway...
I'm seeing this one too, though it works if the binary is launched from a terminal rather than through finder which is certainly strange.
I also see it on an M1
This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSBluetoothAlwaysUsageDescription key with a string value explaining to the user how the app uses this data.
I got this error when I ran it from CLI
Sounds like a .plist
issue...
But it looks like you have the plist stuff...
Indeed. Can you try with a more recent build? https://github.com/emericg/WatchFlower/actions/runs/3660319742
It has both improvements and newer Qt version, maybe that will help.
Still having this issue with version 5 on Mac OS 13.2.1. Also tried a recent build with no luck.
Yes I'm really sorry, this problem has proven difficult to understand and to solve... But I haven't forgotten it. It's just that I failed every time I had a look at it (last time being tonight :)
I've also spent an hour trying to find the error. Imho this must be an upstream bug in Qt and/or OS X?
// Edit: Imho either the .entitlements is not applied correctly when the app is build for OS X and/or bluetooth access is only possible when the app correctly signed (and its a bug for untrusted apps).
Imho this must be an upstream bug in Qt and/or OS X?
Yes Qt doesn't have a great integration of the "new" Bluetooth permission for macOS. That permission appeared recently, and it was working better before, that is a fact. I had high hopes for the new permission system of Qt 6.5, but so far not much luck with it.
the .entitlements is not applied correctly when the app is build for OS X
There were even weirder cases before, like the app run through Qt Creator, run with a terminal or launched through the icon not behaving the same. But now on my mac it is working, I don't have the permission issue anymore. It is working poorly though, it needs time to bring up the permission popup and after granting the permission it takes time to start working.
bluetooth access is only possible when the app correctly signed (and its a bug for untrusted apps).
That is definitely an issue. I think the app cannot save the permission if not signed, and so every time you launch the app it will ask for it again, and exhibit this issue. It cannot just launch with a permission granted and run like it was running before the permission issue.
I think I figured it out. On my local install, I've just added this to my Info.plist:
<key>UIBackgroundModes</key>
<array>
<string>bluetooth-central</string>
</array>
bluetooth-peripheral
seems to work too as a value for this setting. According to this bluetooth-central
is the correct value: https://docs.silabs.com/bluetooth/3.1/general/connections/central-and-peripheral-roles#:~:text=In%20the%20BLE%20world%2C%20the,incoming%20connection%20request%20after%20advertising
Someone able to confirm this? Have it from here: https://stackoverflow.com/a/48390949 Possible value are here: https://developer.apple.com/documentation/bundleresources/information_property_list/uibackgroundmodes
That's interesting, but it is said that UIBackgroundModes is only for iOS, and that using it prevents you from being accepted on the app store. Weird option...
I'll test this on a mac but yes we'll need people to confirm this has an actual impact beyond placebo.
@emericg I've just checked if this automatically prevents you from being accepted to the Appstore and that should only be the case if your App doesn't use Bluetooth (or an Apple employee doesn't understand that is does). And from what I've read this values is definitely needed for Bluetooth to function. I've now working the fifth day with this option.
It made zero difference in my testing, and the doc still says for iOS only. But truth be told I don't really care enough to go against this, so I've added this line to the plist, we'll see if anyone report an actual difference in behavior...
Tested once again with build 7233199927 and can confirm it's working.
I have the same issue with the last build (https://github.com/emericg/WatchFlower/actions/runs/7233199927)
I removed the permission manually and now I'm unable to get it working again. Very weird.
Describe the bug Bluetooth disabled notification after allowing bluetooth acces macOS 12.4. When the app launches I give it permission but all devices show as offline with a notification that my bluetooth is disabled. Also granted additional access in privacy & settings > bluetooth, to see if that makes any difference.
iPad version that can be run from Mac App Store on M1 iMac doesn't have this issue
Expected behavior Sensors show as online
To Reproduce Steps to reproduce the behavior:
Screenshots
Your environment Please describe the environment you are using: