-
Notifications
You must be signed in to change notification settings - Fork 334
Open
Description
Description
Now that iOS is an official supported Python platform since 3.13 (see PEP 730), bleak should also support iOS. iOS shares almost the same CoreBluetooth API as macOS. Unfortunately pyobjc is not supported on iOS. Only rubicon-objc is available. So the main work to support iOS is to implement rubicon-objc instead of/in addition to pyobjc.
What I have done
I tried to replace pyobjc with rubicon-obj and tested it on a macOS. After a few hours the Scanner was basically working. So I would like to continue the work on it and get it working on iOS.
Questions
- If I have a working version in the future, is there a chance that such a PR will be merged?
- Can
pyobjcgenerally be replaced byrubicon-objcfor macOS? (I'm afraid that's not an option, but I wanted to ask the question anyway.) - If not, should
rubicon-objcbe implemented as a second CoreBluetooth backend? That has the disadvantage that much code is duplicated, but the advantage that the currentpyobjcbased CoreBluetooth backend is not touched. Or should the current CoreBluetooth backend be extended to support both objc-frameworksrubicon-objcandpyobjc? In this way more code is shared, but the risk of regressions is greater. - In either way on macOS there would be two possible backends/frameworks available. How to distinguish between the frameworks? My first idea is to add
rubicon-objcasoptional-dependencieson macOS. So to use this on macOS you have topip install bleak[rubicon-objc]. But this would also installpyobjcas this is installed by default on macOS. So there has to be an additional runtime parameter, to tell bleak which framework to use. Where is the best place for this parameter?
Metadata
Metadata
Assignees
Labels
No labels