Core Bluetooth

RSS for tag

Communicate with Bluetooth 4.0 low energy devices using Core Bluetooth.

Posts under Core Bluetooth tag

171 Posts

Post

Replies

Boosts

Views

Activity

Availability for BLE background scanning on watchOS whilst dimmed
I am trying to find out about the availability of BLE scanning for advertisements when a watchOS app (on watchOS 26.4 with CoreBluetooth) which starts running a HKWorkoutSession becomes dimmed, ie. due to the user lowering their arm. From my understanding there is still availability for ongoing scanning whilst in the dimmed mode. If this is correct, what settings are required (e.g. using background capability for 'Workout Processing', 'bluetooth-central', etc), and does scanning whilst in background mode limit to requiring service uuids in scanForPeripherals? Also if scanning is throttled, is there an 'estimated' inter scan time? Thanks
0
0
65
10h
AccessorySetupKit: Can I use bluetoothNameSubstring be used without bluetoothCompanyIdentifier?
I'm integrating AccessorySetupKit for BLE earbuds discovery and running into an issue with ASDiscoveryDescriptor configuration. Our earbuds don't have a fixed Bluetooth SIG company identifier. So I'm trying to use bluetoothNameSubstring + bluetoothServiceUUID instead. However, this combination never discovers any devices. The picker appears but stays empty. As soon as I add a bluetoothCompanyIdentifier, the device is found instantly. I reproduced this with my Bose QC35 II as well, so it's not specific to our hardware. My configuration: bluetoothServiceUUID: set to our custom UUID bluetoothNameSubstring: set to a substring matching the advertised device name NSAccessorySetupBluetoothServices + NSAccessorySetupBluetoothNames both set in Info.plist supportedOptions: .bluetoothPairingLE iOS 26.3.1, iPhone 11 The documentation doesn't mention that bluetoothCompanyIdentifier is required. Is bluetoothCompanyIdentifier actually required for BLE discovery? If so, is there a recommended approach for devices that don't have a fixed company identifier?
1
0
26
2d
Core Bluetooth Events when enabling State Restoration
Hello dear Apple Platform Engineers, I'm working on an iOS App that connects to a Bluetooth Low Energy Peripheral in the foreground. Whenever the App moves into Background, we want to continue syncing data & therefore implemented State Restoration to be informed about Discovery, Connect, Disconnect or Characteristic changes in the Background in order to wake the App up whenever it was "Terminated due to memory issue". I consulted https://developer.apple.com/library/archive/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/CoreBluetoothBackgroundProcessingForIOSApps/PerformingTasksWhileYourAppIsInTheBackground.html#//apple_ref/doc/uid/TP40013257-CH7-SW1 for this & assigned: CBCentralManagerOptionRestoreIdentifierKey Reinstantiate the dedicated CentralManager & implemented the centralManager(_ central: CBCentralManager, willRestoreState dict: [String : Any]) Delegate Additionally, I assigned the following keys on connect(_ peripheral: CBPeripheral, options: [String : Any]? = nil) CBConnectPeripheralOptionNotifyOnConnectionKey CBConnectPeripheralOptionNotifyOnDisconnectionKey CBConnectPeripheralOptionNotifyOnNotificationKey However, from my experience the App gets woken up, but neither the willRestoreState nor the didDiscover, didConnect or didDisconnectPeripheral is called even though launchOptions?[UIApplication.LaunchOptionsKey.bluetoothCentrals] as? [String] is not empty. What might I be missing when trying to make this approach work? Thanks a lot for any insights & support!
2
0
54
1d
iPad Pro Wi-Fi ping spikes with Bluetooth (iPadOS 26
Device Info: Device: iPad Pro 2022 (M2) OS: iPadOS 26.4 Network: 5GHz Wi-Fi Accessory: Apple Pencil (2nd Generation) Issue Description: Since updating to iPadOS 26, I experience periodic ping spikes during online gaming whenever Bluetooth is enabled. Since I use an Apple Pencil which requires Bluetooth, the issue affects me constantly during gaming sessions. Simply turning off Bluetooth in Settings does not fix the problem — the only way to temporarily restore normal ping is to turn off Bluetooth and then fully reboot the device. My Wi-Fi connection itself is fine, and other devices on the same 5GHz network have no issues. What I've Already Tried: Confirmed Wi-Fi is on 5GHz band (not 2.4GHz) Turning off Bluetooth + rebooting the device (temporary fix only, not a permanent solution) Reset network settings Updated to the latest iPadOS version (26.4) Important Background: When iPadOS 26 first launched, Apple Support provided a Configuration Profile that resolved the issue upon installation. However, the profile expired after approximately one week, and the problem has persisted ever since — never fixed by any subsequent update. I am currently on iPadOS 26.4 and the issue remains. My Questions: Has anyone else experienced this? Are there any known workarounds? Has Apple released an updated Configuration Profile or announced a fix for this specific issue?
1
0
37
2d
App review rejection due to accessibility
Hi, and apologies for a long post! We have created an app that enables wireless communication with FIDO2 devices over Bluetooth by creating virtual HID devices and translating the packages. In order to do this, we use the HIDVirtualDevice class as described here: https://developer.apple.com/documentation/corehid/creatingvirtualdevices We learned the hard way that this sample code does not work without the “com.apple.developer.hid.virtual.device“ entitlement, but with it, it behaves as expected. Now, our application has been rejected during Review, both by the initial App Review and the appeal to the App Review Board. The problem is that I can’t really figure out what the issue is. The first rejection states the following: The app requests access to Accessibility features on macOS but does not use these features for accessibility purposes. Specifically, the app uses Accessibility features for non-accessibility feature. (Please see attached screenshot) The attached screenshot is of the screen the app shows when requesting permissions, with this code: else if bluetoothManager.requirePermissions { GradientTitle(text: "PERMISSIONS \nNEEDED") Text( """ This application requires additional permissions to run. Open the settings menu to allow access before restarting the application. """ ) and a button with this action: if let url = URL( string:"x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility" ) { NSWorkspace.shared.open(url) } The requirePermissions boolean is set from here, let properties = HIDVirtualDevice.Properties( descriptor: VirtualDevice.fidoDescriptor, vendorID: VirtualDevice.vendorId ) if HIDVirtualDevice(properties: properties) != nil { await MainActor.run { self.requirePermissions = false } break } else { await MainActor.run { self.requirePermissions = true } When HIDVirtualDevice(properties: properties) is called, a system pop-up with App would like to control this computer using accessibility features. Grant access to this application in Security and Privacy preferences located in System Preferences. shows. I responded to the rejection by trying to argue that allowing you to use your device wirelessly does increase accessibility, and that this is the only purpose of the app. Their response was: Regarding 2.4.5, Accessibility usage. To resolve this issue, it would be appropriate to remove Accessibility usage for non-accessibility purposes. Should you require more assistance with resolving this issue, Apple Developer Technical Support is available to provide direct one-on-one support for discrete code-level questions. Please be sure to include any crash logs, screenshots or steps to reproduce this issue in your request. I contacted technical support and tried to explain the issue again, and got the following response: Guideline 2.4.5 - Performance The app requests access to Accessibility features on macOS but does not use these features for accessibility purposes. Specifically, the app uses Accessibility features for non-accessibility feature. Accessibility features are intended to help users with different capabilities interact with their devices and app. Apps may not use features designed to increase accessibility for other purposes. We understand that the reason for using Accessibility feature on macOS. However, the usage is not compliant with the provided guideline. The last sentence is not complete, and it’s hard to understand what the issue is, given that they have not actually responded to my arguments. My best guess right now is point 2.4.5 (v): 2.4.5 Apps distributed via the Mac App Store have some additional requirements to keep in mind: (v) They may not request escalation to root privileges or use setuid attributes. If this is the case, I can understand the rejection, although it’s strange they didn’t just say so then. If that is correct, given that the system pop-up and accessibility requirement also trigger when running their sample code (which creates a virtual keyboard), does that mean that no one using this class and framework can submit apps to the App Store? I never intended to use an accessibility framework, and I was quite surprised the first time the pop-up appeared. RIght now I'm just confused and dissapointed with the level of feedback from Apple, and would appreciate any help, either in providing a solution or just explaining what the specific issue is.
0
0
26
6d
iOS26 系统锁屏一段时间,蓝牙钥匙和数字钥匙都不能正常工作
Recently, we have received continuous feedback from users that the Bluetooth key and digital key are not working properly or are not functioning; Through analysis of App logs, it was found that after the iOS system locks the screen, the iBeacon background keep-alive function fails, Bluetooth connection also fails, and system callbacks cannot be obtained; the digital key also fails, and it fails simultaneously with the Bluetooth key; We have checked the specific permission configuration and it aligns with the recommended configuration in the official documentation, with no abnormalities. Although this type of issue is not a widespread problem, it has been continuously reported by users and is very troublesome. Does the official team have a clear explanation? Why are both Bluetooth keys and digital keys affected after the app is locked? Digital keys should be less affected. The following is a log analysis of a certain user 1: Step 2, the App entered the background; Step 3, the App's Bluetooth was disconnected; 3-4 The App remained in the background for 5 hours before being launched again 2: This type of issue is due to the system disconnecting the Bluetooth connection when the app enters the background; most likely, the app has been killed by the system when the user gets out of the car, and it has not been revived; the car key also does not work; During the time period from 2026-03-23T17:59:33 to 2026-03-23T21:23:49, why didn't carkey work properly 1:2026-03-23T16:52:11.676+08:00 new_carkey: key:, rssi:-89, AUTH_OK 2:2026-03-23T17:55:51.782+08:00 new_carkey: AppMonitor appDidEnterBackground bleStatus: success(Nimbus.NIOCarBLEKey.State.connected) 3:2026-03-23T17:59:33.747+08:00 new_carkey: ibeacon: didExitRegion, vid: NIO BLE Key, uuid: *** bleStatus: failure(Error Domain=CBErrorDomain Code=15 ""Failed to encrypt the connection, the connection has timed out unexpectedly."" UserInfo={key_device_name=NIO Key 0201 , NSLocalizedDescription=Failed to encrypt the connection, the connection has timed out unexpectedly., vehicle_id=}) " 4:2026-03-23T21:23:49.920+08:00 new_carkey: AppMonitor appDidFinishLaunching: [:] bleStatus: success(Nimbus.NIOCarBLEKey.State.disconnected) 5:2026-03-23T22:01:51.235+08:00 new_carkey: key:****, rssi:-90, AUTH_OK
0
0
33
1w
How to initiate native cellular calls without user confirmation from a companion app (like Meta Ray-Ban glasses)
We are building an AI-powered smart glasses companion app, similar to Meta Ray-Ban. We want to provide true hands-free calling support. Right now, whenever the app tries to dial a native cellular call, iOS shows a confirmation screen that requires the user to tap to start the call. If the user always has to confirm/tap on the phone screen, there is no real point in using smart glasses for making calls. How can we initiate a native outgoing call without any confirmation dialog or extra tap, exactly like Siri does it, or like the Meta Ray-Ban glasses do when the user says “Hey Meta, call [name]” Please guide us on the correct APIs, entitlements, or integration path to achieve this behavior. Thank you.
0
0
44
2w
Can't create a Live Activity from background
Our app is using the CLLocationManager to wake up the app near an iBeacon and then tries to connect to the accessory via bluetooth and UWB. For this to work in the background we need to create a Live Activity and show the user that the app is doing something. When the app is in the foreground or just recently got into the inactivity mode this works fine and we can use CoreBluetooth/NearbyInteraction even when the app then enters the background mode. But when the app is longer in the background creating a Live Activity via Activity.request() throws an ActivityAuthorizationError.visibility. According to the documentation the LiveActivityIntent is able to workaround this background restriction but I get the same exception when I create the LiveActivity from the perform() method. Is there another API to create Live Activities? Do I need to prepare the LiveActivityIntent somehow?
1
0
115
3w
Significant change or restart app without location UIBackgroundModes key
Situation: We have an app that only uses location UIBackgroundModes key to restart our app on significant change events as we need it to connect with a BLE device (mounted in the car) when someone starts driving. We cannot use geofence as the car might be used by multiple people so position changes and we don't want to store locations and sent them to multiple users via our servers. So currently we use significant change and just ignore all other location data. During app review we got the following feedback: If the app does not require persistent real-time location updates, please remove the "location" setting from the UIBackgroundModes key. You may wish to use the significant-change location service or the region monitoring location service if persistent real-time location updates are not required for the app features. Question: How to use the significant-change location service without the "location" setting from the UIBackgroundModes key or is there any other way to start the app / connect with the BLE device when it is fully terminated/swiped away? Because the docs state that AuthorizationStatusAuthorizedAlways is required and without the UIBackgroundModes key location that wouldn't be triggered when app is in the background/swiped away. Reference: https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/LocationAwarenessPG/CoreLocation/CoreLocation.html#//apple_ref/doc/uid/TP40009497-CH2-SW8
3
0
114
3w
Resources for hardware developers?
Good morning, Apple devs. I'm looking for resources and help designing a BLE hardware peripheral that is compatible with iOS and iPad. I've seen the MFi program, but I've also seen plenty of peripheral devices that work with iOS and iPad that are not listed in the MFi compatibility lists. Can anyone refer me to the proper channels to get support for development of a hardware device? Thank you.
1
0
102
3w
Bluetooth audio packet alignment
We’re evaluating a Bluetooth device that supports Hands Free Profile (HFP) as the “Hands-Free Unit”. You can think of this as a Bluetooth telephone headset. This device interacts with our iOS application. We observed the following. The iPhone 17 HFP Wide-Band Speech (WBS) mSBC decoder requires the WBS packet (H2 header + mSBC frame) to be sent aligned. Aligned meaning, the H2 header must be first in every packet. The WBS packet cannot span multiple eSCO packets or else the iPhone will discard the audio. This is a different implementation than the iPad (iPad Pro 11-inch M4) , presumably due to Apple’s new N1 chip. In other words, we’ve identified that older iPhones and iPads do not require this alignment. They have implemented a stateful parser/decoder of the HFP WBS audio. A quick picture to help illustrate. The iPhone 17 requires: | Frame | Frame | Frame | Frame | However, a Bluetooth implementation we are evaluating does: | me Fra | me Fra | me Fra | me Fra | Does Apple intend to keep this implementation and continue discarding audio frames that are not aligned? Page 115 of the Bluetooth HFP 1.8 specification mentions at the bottom that this behavior is “left up to the implementation” but that the “synchronization header enables unaligned codec audio frames to be recovered by the receiving side.” We understand and acknowledge that one whole frame per eSCO packet is the intended, optimal method for delivering WBS mSBC audio for reduced jitter, latency, and memory usage. However, the more robust solution would be to maintain a stateful receiver as previously implemented. Any input would be appreciated.
3
0
141
3w
BLE characteristic values swapped
Several of my users are reporting on at lest recent and current versions of iOS the value from one characteristic can be swapped with another. Originally I thought this was a library issue but it doesn't happen on Android and now a user with two iPhones using the exact same app and iOS 26.3 on both has the issue on one phone but not the other. I've gone into more detail here which also includes a little data dumping to prove the values between characteristics can be mixed up. https://github.com/dotintent/react-native-ble-plx/issues/1316 One user reported cycling Bluetooth on/off fixed the issue but the latest user says it does not. For the peripheral the services can only change if the device enters firmware update mode (in which case the service UUID is different). Otherwise the characteristics on a service never change. This would make it a strange one to be caching related since the cache should always be correct.
3
0
84
4w
Losing advertising packets when CBCentralManager scanForPeripheralsWithServices is left on
Right now, I am scanning for specific BLE peripherals with my iPad app, using this: [self.cbCentralManager scanForPeripheralsWithServices:serviceUUIDsToScanFor options:@{CBCentralManagerScanOptionAllowDuplicatesKey:@YES}]; I have the "CBCentralManagerScanOptionAllowDuplicatesKey" set true because I need to be able to detect when a peripheral is no longer advertising, so I capture each "didDiscoverPeripheral" callback and set a 3-second timer that notifies the user that that peripheral is no longer in range if another didDiscoverPeripheral hasn't been received in that time. The peripherals all advertise at 100ms intervals. What's weird is that if I leave the scan on for a long time, the advertising packets slow down, and eventually one of those timers times out, around about one or two minutes for the first instance, and then every 10-20 seconds after that. I've checked with ATS for all the BLE traffic, and there are indeed > 3-second gaps in the advertising packets that the iPad sees, so it's not my code introducing the gap. Is there some reason long-running scans should not be done on iPadOS (both 18 and 26.1 used)? I've tested out switching my scan to "stopScan" and restart it every 10 seconds, and that seems to have resolved the issue, but it's unclear why that would matter (and that does not seem like an appropriate use of the stop and start scans). Thanks!
3
0
158
Feb ’26
AirPods 4 Bluetooth Firmware Bug in L2CAP
Hello, I am a Bluetooth Engineer at Google investigating an interoperability bug between an Android device and AirPods 4. When requesting an L2CAP connection (with PSM = AVDTP) to the AirPods during SDP service discovery, The AirPods L2CAP layer incorrectly responds with a "refused - no resources available" status followed by a Pending status and a Success status. This violates the specification, which says that the request has been fully rejected after the refused status and should not receive followup responses. I suspect the "no resources available" response is a bug. This prevents A2DP from working with the AirPods. This bug does not exist with AirPods 2 firmware. Here is a packet capture: 1602 1969-12-31 16:07:04.805261 0.062473 localhost () Apple_6b:db:09 (AirPods) L2CAP 17 Sent Connection Request (AVDTP, SCID: 0x22c6) 1603 1969-12-31 16:07:04.810953 0.005692 controller host HCI_EVT 8 Rcvd Number of Completed Packets 1604 1969-12-31 16:07:04.811078 0.000125 Apple_6b:db:09 (AirPods) localhost () SDP 27 Rcvd Service Search Attribute Request : Device Information: [Bluetooth Profile Descriptor List 0x0009] 1605 1969-12-31 16:07:04.821249 0.010171 localhost () Apple_6b:db:09 (AirPods) SDP 19 Sent Service Search Attribute Response 1606 1969-12-31 16:07:04.876396 0.055147 controller host HCI_EVT 8 Rcvd Number of Completed Packets 1607 1969-12-31 16:07:04.876464 0.000068 Apple_6b:db:09 (AirPods) localhost () L2CAP 21 Rcvd Connection Response - Refused - no resources available (SCID: 0x22c6) 1608 1969-12-31 16:07:04.942539 0.066075 Apple_6b:db:09 (AirPods) localhost () SDP 41 Rcvd Service Search Attribute Request : Unknown: [Bluetooth Profile Descriptor List 0x0009] 1609 1969-12-31 16:07:04.951052 0.008513 localhost () Apple_6b:db:09 (AirPods) SDP 19 Sent Service Search Attribute Response 1610 1969-12-31 16:07:05.010605 0.059553 controller host HCI_EVT 8 Rcvd Number of Completed Packets 1611 1969-12-31 16:07:05.080593 0.069988 Apple_6b:db:09 (AirPods) localhost () SDP 27 Rcvd Service Search Attribute Request : GATT: [Bluetooth Profile Descriptor List 0x0009] 1612 1969-12-31 16:07:05.087636 0.007043 localhost () Apple_6b:db:09 (AirPods) SDP 19 Sent Service Search Attribute Response 1613 1969-12-31 16:07:05.209417 0.121781 controller host HCI_EVT 8 Rcvd Number of Completed Packets 1614 1969-12-31 16:07:05.279491 0.070074 Apple_6b:db:09 (AirPods) localhost () L2CAP 21 Rcvd Connection Response - Pending (SCID: 0x22c6) 1615 1969-12-31 16:07:05.280731 0.001240 Apple_6b:db:09 (AirPods) localhost () L2CAP 21 Rcvd Connection Response - Success (SCID: 0x22c6, DCID: 0x0406) Please file this bug with the AirPods Bluetooth team.
1
0
164
Feb ’26
Seeking advice consulting Bluetooth BLE iOS App build EXPO EAS. Native React.
I’m close to finishing my App build (using Rork.com) and need advice consulting on adding BLE Bluetooth functionality to connect to Cycling Sensors, speed cadence, watts, smart indoor cycling trainers, heart rate straps etc. My questions are as a complete beginner: 1: How much time is needed to set up BLE connections in Expo.dev using EAS build? 2: Where can I find a trustworthy tech to implement this? and on a second aspect for the app. I need someone to help set up REVENUECAT, for annual subscriptions. I’ve partly set it up for testing. How much time is needed here? many thanks for your time in advance for any help / assistance you’re able to provide. cherrs ben
0
0
76
Feb ’26
BLE advertising/scanning communication broken on iPhone 17 — CBPeripheralManager + CBCentralManager workflow
Environment: iPhone 17 / iPhone 17 Pro (Apple N1 chip) iOS 26.x Xcode 26 Framework: Flutter app with native iOS BLE library (CoreBluetooth) We have a production IoT app that communicates with BLE nodes (Nordic, PIC, EnOcean peripherals) using an advertising/scanning-based protocol — not GATT connections. The app broadcasts commands via CBPeripheralManager (advertising service UUIDs) and receives responses by scanning with CBCentralManager (reading manufacturer data and service UUIDs from advertisement packets). This workflow has been reliable across all iPhone models from iPhone 8 through iPhone 16 Pro Max. On iPhone 17 devices, we are experiencing multiple failures in this workflow. Architecture: Sending commands: We use CBPeripheralManager.startAdvertising() with CBAdvertisementDataServiceUUIDsKey to broadcast a UUID-encoded command to nearby nodes. Receiving responses: We use CBCentralManager.scanForPeripherals(withServices: nil, options: [CBCentralManagerScanOptionAllowDuplicatesKey: true]) and filter responses in centralManager(_:didDiscover:advertisementData:rssi:) by matching CBAdvertisementDataServiceUUIDsKey or CBAdvertisementDataManufacturerDataKey against expected UUID masks. Communication pattern: Advertise a command → stop advertiser → start scanner → wait for matching response → process result. Typical timeout is 1.5 seconds per exchange. Issues observed on iPhone 17: peripheralManagerDidStartAdvertising behaviour change After calling CBPeripheralManager.startAdvertising(:), the delegate callback peripheralManagerDidStartAdvertising(:error:) either fires with errors that did not occur on previous hardware, or advertising does not appear to reach the peripheral nodes at all. The same advertising payload works immediately when tested on iPhone 15/16. Is the N1 chip's Bluetooth 6 stack handling CBAdvertisementDataServiceUUIDsKey advertising differently? Are there new constraints on advertising payload size or format? Scanner returning fewer/no results with withServices: nil Our scanner uses scanForPeripherals(withServices: nil) because we need to read manufacturer data from advertisement packets and filter using a custom UUID mask. On iPhone 17, we observe significantly fewer didDiscover callbacks compared to iPhone 15/16 in the same physical environment, with the same nodes advertising. We understand that passing service UUIDs in withServices: is recommended, but our protocol requires reading raw manufacturer data bytes that aren't associated with a single service UUID — we use mask-based matching (e.g., filter mask 11110000-0000-0000-0000-000000000000 against scan results). Has the N1 chip changed the rate or filtering behaviour of unfiltered BLE scans? Is there a new throttling mechanism? Background scanning stops immediately When the app moves to background, scanning appears to stop entirely on iPhone 17 — even with bluetooth-central in UIBackgroundModes. On iPhone 16, background scanning continued (at reduced intervals) and delivered results for peripherals advertising filtered service UUIDs. Aggressive session termination on app backgrounding Our advertise-then-scan sequences (typically 1.5s round-trip) are being interrupted when the user briefly switches apps. The CBPeripheralManager stops advertising and the CBCentralManager stops scanning, causing timeout errors. This was not observed on previous iPhone models with the same iOS background mode configuration. Questions for Apple: Are there documented changes to CoreBluetooth behaviour on the N1 Bluetooth 6 chip that affect advertising-based (non-GATT) communication patterns? Has the scan response rate for scanForPeripherals(withServices: nil) been intentionally reduced on iPhone 17? Is CBCentralManagerOptionRestoreIdentifierKey now required for reliable background scanning on iPhone 17, or is this a known regression? Are there new advertising payload constraints (size, format, interval) that we should be aware of for the N1 chip? What we've tried: Added NSBluetoothAlwaysUsageDescription and NSBluetoothWhileInUseUsageDescription to Info.plist Confirmed Bluetooth permissions are granted Tested with identical BLE nodes that work on iPhone 15/16 Verified CBManagerState.poweredOn before all operations Any guidance or known workarounds would be greatly appreciated. Happy to provide sysdiagnose logs or a minimal reproducible sample project.
3
0
379
Feb ’26
iOS App never gets Bluetooth connection
I am developing an iOS App for a Bluetooth peripheral using SwiftUI with Swift 5 or 6. I have a few past attempts that got so far (connected to a peripheral), and some downloaded examples that connect to peripherals. Lately (last month or so), my current attempt never gets BleManager to start, and every attempt ends at my View that says 'please enable Bluetooth'. The Xcode console is totally blank with no print outputs. Coding Assistant suggested the init() in my @main structure could contain print("App initializing"), but even that never prints. Coding Assistant suggests: "• Open your project's Info.plist in Xcode. • Make sure UIApplicationSceneManifest is present and configured for SwiftUI, not referencing any storyboard. • Ensure UIMainStoryboardFile is not present (or blank)." but there is no info.plist because it is no longer required. Downloaded sample code runs and connects to peripherals, so Bluetooth is working on my iPhone and the Bluetooth device is accessible. My older attempts used to work, but now have the same problem. All attempts have "Enable Bluetooth to connect to Device" in the Privacy - Bluetooth Info.plist setting. Something is fundamentally wrong with many different code attempts. I have searched all the various settings for mention of SwiftUI or Storyboard, but not found them in working or failing projects. The downloaded code which works has minimum deployment iOS 14.0 and Swift Compiler Language Version Swift 5. My latest code attempt has minimum deployment iOS 16 and Swift 5. All code is target device iPhone (I am testing on iPhone 16e running iOS 26.2.1) and developing with Xcode 26.2 on MacBook Air M1 running the latest Tahoe. I do a Clean Build Folder before every test, and have tried re-starting both Mac and iPhone. How can my coding fail so spectacularly?
2
0
168
Feb ’26
BLE Scanning
iOS BLE Background Scanning Stops After Few Minutes to Hours Hi everyone, I'm developing a Flutter app using flutter_blue_plus that needs continuous BLE scanning in both foreground and background. Foreground scanning works perfectly, but background scanning stops after a few minutes (sometimes 1-2 hours). Current Implementation (iOS) Foreground Mode: Scans for 10 seconds with all target service UUIDs Batches and submits results every 10 seconds Works reliably ✅ Background Mode: Rotates through service UUIDs in batches of 7 Uses 1-minute batch intervals Maintains active location streaming (Geolocator.getPositionStream) Switches modes via AppLifecycleState observer // Background scanning setup await FlutterBluePlus.startScan( withServices: serviceUuids, // Batch of 7 UUIDs continuousUpdates: true, ); // Location streaming (attempt to keep app alive) LocationSettings( accuracy: LocationAccuracy.bestForNavigation, distanceFilter: 0, ); Lifecycle Management: AppLifecycleState.paused -> Start background mode AppLifecycleState.resumed -> Start foreground mode Questions: Is there a documented maximum duration for iOS background BLE scanning? My scanning stops inconsistently (few minutes to 2 hours). Does iOS require specific Background Modes beyond location updates to maintain BLE scanning? I have location streaming active but scanning still stops. Are there undocumented limitations when scanning with service UUIDs in background that might cause termination? Should I be using CoreBluetooth's state preservation/restoration instead of continuous scanning? Info.plist Configuration: <key>UIBackgroundModes</key> <array> <string>bluetooth-central</string> <string>location</string> </array> Additional Context: Total service UUIDs: ~20-50 (varies by company) Scanning in batches of 7 to work around potential limitations Android version works fine with foreground service Location permission: Always iOS 14+ target Any insights on iOS BLE background limitations or best practices would be greatly appreciated. Thanks!
1
0
132
Feb ’26
Availability for BLE background scanning on watchOS whilst dimmed
I am trying to find out about the availability of BLE scanning for advertisements when a watchOS app (on watchOS 26.4 with CoreBluetooth) which starts running a HKWorkoutSession becomes dimmed, ie. due to the user lowering their arm. From my understanding there is still availability for ongoing scanning whilst in the dimmed mode. If this is correct, what settings are required (e.g. using background capability for 'Workout Processing', 'bluetooth-central', etc), and does scanning whilst in background mode limit to requiring service uuids in scanForPeripherals? Also if scanning is throttled, is there an 'estimated' inter scan time? Thanks
Replies
0
Boosts
0
Views
65
Activity
10h
AccessorySetupKit: Can I use bluetoothNameSubstring be used without bluetoothCompanyIdentifier?
I'm integrating AccessorySetupKit for BLE earbuds discovery and running into an issue with ASDiscoveryDescriptor configuration. Our earbuds don't have a fixed Bluetooth SIG company identifier. So I'm trying to use bluetoothNameSubstring + bluetoothServiceUUID instead. However, this combination never discovers any devices. The picker appears but stays empty. As soon as I add a bluetoothCompanyIdentifier, the device is found instantly. I reproduced this with my Bose QC35 II as well, so it's not specific to our hardware. My configuration: bluetoothServiceUUID: set to our custom UUID bluetoothNameSubstring: set to a substring matching the advertised device name NSAccessorySetupBluetoothServices + NSAccessorySetupBluetoothNames both set in Info.plist supportedOptions: .bluetoothPairingLE iOS 26.3.1, iPhone 11 The documentation doesn't mention that bluetoothCompanyIdentifier is required. Is bluetoothCompanyIdentifier actually required for BLE discovery? If so, is there a recommended approach for devices that don't have a fixed company identifier?
Replies
1
Boosts
0
Views
26
Activity
2d
Core Bluetooth Events when enabling State Restoration
Hello dear Apple Platform Engineers, I'm working on an iOS App that connects to a Bluetooth Low Energy Peripheral in the foreground. Whenever the App moves into Background, we want to continue syncing data & therefore implemented State Restoration to be informed about Discovery, Connect, Disconnect or Characteristic changes in the Background in order to wake the App up whenever it was "Terminated due to memory issue". I consulted https://developer.apple.com/library/archive/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/CoreBluetoothBackgroundProcessingForIOSApps/PerformingTasksWhileYourAppIsInTheBackground.html#//apple_ref/doc/uid/TP40013257-CH7-SW1 for this & assigned: CBCentralManagerOptionRestoreIdentifierKey Reinstantiate the dedicated CentralManager & implemented the centralManager(_ central: CBCentralManager, willRestoreState dict: [String : Any]) Delegate Additionally, I assigned the following keys on connect(_ peripheral: CBPeripheral, options: [String : Any]? = nil) CBConnectPeripheralOptionNotifyOnConnectionKey CBConnectPeripheralOptionNotifyOnDisconnectionKey CBConnectPeripheralOptionNotifyOnNotificationKey However, from my experience the App gets woken up, but neither the willRestoreState nor the didDiscover, didConnect or didDisconnectPeripheral is called even though launchOptions?[UIApplication.LaunchOptionsKey.bluetoothCentrals] as? [String] is not empty. What might I be missing when trying to make this approach work? Thanks a lot for any insights & support!
Replies
2
Boosts
0
Views
54
Activity
1d
iPad Pro Wi-Fi ping spikes with Bluetooth (iPadOS 26
Device Info: Device: iPad Pro 2022 (M2) OS: iPadOS 26.4 Network: 5GHz Wi-Fi Accessory: Apple Pencil (2nd Generation) Issue Description: Since updating to iPadOS 26, I experience periodic ping spikes during online gaming whenever Bluetooth is enabled. Since I use an Apple Pencil which requires Bluetooth, the issue affects me constantly during gaming sessions. Simply turning off Bluetooth in Settings does not fix the problem — the only way to temporarily restore normal ping is to turn off Bluetooth and then fully reboot the device. My Wi-Fi connection itself is fine, and other devices on the same 5GHz network have no issues. What I've Already Tried: Confirmed Wi-Fi is on 5GHz band (not 2.4GHz) Turning off Bluetooth + rebooting the device (temporary fix only, not a permanent solution) Reset network settings Updated to the latest iPadOS version (26.4) Important Background: When iPadOS 26 first launched, Apple Support provided a Configuration Profile that resolved the issue upon installation. However, the profile expired after approximately one week, and the problem has persisted ever since — never fixed by any subsequent update. I am currently on iPadOS 26.4 and the issue remains. My Questions: Has anyone else experienced this? Are there any known workarounds? Has Apple released an updated Configuration Profile or announced a fix for this specific issue?
Replies
1
Boosts
0
Views
37
Activity
2d
App review rejection due to accessibility
Hi, and apologies for a long post! We have created an app that enables wireless communication with FIDO2 devices over Bluetooth by creating virtual HID devices and translating the packages. In order to do this, we use the HIDVirtualDevice class as described here: https://developer.apple.com/documentation/corehid/creatingvirtualdevices We learned the hard way that this sample code does not work without the “com.apple.developer.hid.virtual.device“ entitlement, but with it, it behaves as expected. Now, our application has been rejected during Review, both by the initial App Review and the appeal to the App Review Board. The problem is that I can’t really figure out what the issue is. The first rejection states the following: The app requests access to Accessibility features on macOS but does not use these features for accessibility purposes. Specifically, the app uses Accessibility features for non-accessibility feature. (Please see attached screenshot) The attached screenshot is of the screen the app shows when requesting permissions, with this code: else if bluetoothManager.requirePermissions { GradientTitle(text: "PERMISSIONS \nNEEDED") Text( """ This application requires additional permissions to run. Open the settings menu to allow access before restarting the application. """ ) and a button with this action: if let url = URL( string:"x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility" ) { NSWorkspace.shared.open(url) } The requirePermissions boolean is set from here, let properties = HIDVirtualDevice.Properties( descriptor: VirtualDevice.fidoDescriptor, vendorID: VirtualDevice.vendorId ) if HIDVirtualDevice(properties: properties) != nil { await MainActor.run { self.requirePermissions = false } break } else { await MainActor.run { self.requirePermissions = true } When HIDVirtualDevice(properties: properties) is called, a system pop-up with App would like to control this computer using accessibility features. Grant access to this application in Security and Privacy preferences located in System Preferences. shows. I responded to the rejection by trying to argue that allowing you to use your device wirelessly does increase accessibility, and that this is the only purpose of the app. Their response was: Regarding 2.4.5, Accessibility usage. To resolve this issue, it would be appropriate to remove Accessibility usage for non-accessibility purposes. Should you require more assistance with resolving this issue, Apple Developer Technical Support is available to provide direct one-on-one support for discrete code-level questions. Please be sure to include any crash logs, screenshots or steps to reproduce this issue in your request. I contacted technical support and tried to explain the issue again, and got the following response: Guideline 2.4.5 - Performance The app requests access to Accessibility features on macOS but does not use these features for accessibility purposes. Specifically, the app uses Accessibility features for non-accessibility feature. Accessibility features are intended to help users with different capabilities interact with their devices and app. Apps may not use features designed to increase accessibility for other purposes. We understand that the reason for using Accessibility feature on macOS. However, the usage is not compliant with the provided guideline. The last sentence is not complete, and it’s hard to understand what the issue is, given that they have not actually responded to my arguments. My best guess right now is point 2.4.5 (v): 2.4.5 Apps distributed via the Mac App Store have some additional requirements to keep in mind: (v) They may not request escalation to root privileges or use setuid attributes. If this is the case, I can understand the rejection, although it’s strange they didn’t just say so then. If that is correct, given that the system pop-up and accessibility requirement also trigger when running their sample code (which creates a virtual keyboard), does that mean that no one using this class and framework can submit apps to the App Store? I never intended to use an accessibility framework, and I was quite surprised the first time the pop-up appeared. RIght now I'm just confused and dissapointed with the level of feedback from Apple, and would appreciate any help, either in providing a solution or just explaining what the specific issue is.
Replies
0
Boosts
0
Views
26
Activity
6d
iOS26 系统锁屏一段时间,蓝牙钥匙和数字钥匙都不能正常工作
Recently, we have received continuous feedback from users that the Bluetooth key and digital key are not working properly or are not functioning; Through analysis of App logs, it was found that after the iOS system locks the screen, the iBeacon background keep-alive function fails, Bluetooth connection also fails, and system callbacks cannot be obtained; the digital key also fails, and it fails simultaneously with the Bluetooth key; We have checked the specific permission configuration and it aligns with the recommended configuration in the official documentation, with no abnormalities. Although this type of issue is not a widespread problem, it has been continuously reported by users and is very troublesome. Does the official team have a clear explanation? Why are both Bluetooth keys and digital keys affected after the app is locked? Digital keys should be less affected. The following is a log analysis of a certain user 1: Step 2, the App entered the background; Step 3, the App's Bluetooth was disconnected; 3-4 The App remained in the background for 5 hours before being launched again 2: This type of issue is due to the system disconnecting the Bluetooth connection when the app enters the background; most likely, the app has been killed by the system when the user gets out of the car, and it has not been revived; the car key also does not work; During the time period from 2026-03-23T17:59:33 to 2026-03-23T21:23:49, why didn't carkey work properly 1:2026-03-23T16:52:11.676+08:00 new_carkey: key:, rssi:-89, AUTH_OK 2:2026-03-23T17:55:51.782+08:00 new_carkey: AppMonitor appDidEnterBackground bleStatus: success(Nimbus.NIOCarBLEKey.State.connected) 3:2026-03-23T17:59:33.747+08:00 new_carkey: ibeacon: didExitRegion, vid: NIO BLE Key, uuid: *** bleStatus: failure(Error Domain=CBErrorDomain Code=15 ""Failed to encrypt the connection, the connection has timed out unexpectedly."" UserInfo={key_device_name=NIO Key 0201 , NSLocalizedDescription=Failed to encrypt the connection, the connection has timed out unexpectedly., vehicle_id=}) " 4:2026-03-23T21:23:49.920+08:00 new_carkey: AppMonitor appDidFinishLaunching: [:] bleStatus: success(Nimbus.NIOCarBLEKey.State.disconnected) 5:2026-03-23T22:01:51.235+08:00 new_carkey: key:****, rssi:-90, AUTH_OK
Replies
0
Boosts
0
Views
33
Activity
1w
How to initiate native cellular calls without user confirmation from a companion app (like Meta Ray-Ban glasses)
We are building an AI-powered smart glasses companion app, similar to Meta Ray-Ban. We want to provide true hands-free calling support. Right now, whenever the app tries to dial a native cellular call, iOS shows a confirmation screen that requires the user to tap to start the call. If the user always has to confirm/tap on the phone screen, there is no real point in using smart glasses for making calls. How can we initiate a native outgoing call without any confirmation dialog or extra tap, exactly like Siri does it, or like the Meta Ray-Ban glasses do when the user says “Hey Meta, call [name]” Please guide us on the correct APIs, entitlements, or integration path to achieve this behavior. Thank you.
Replies
0
Boosts
0
Views
44
Activity
2w
Can't create a Live Activity from background
Our app is using the CLLocationManager to wake up the app near an iBeacon and then tries to connect to the accessory via bluetooth and UWB. For this to work in the background we need to create a Live Activity and show the user that the app is doing something. When the app is in the foreground or just recently got into the inactivity mode this works fine and we can use CoreBluetooth/NearbyInteraction even when the app then enters the background mode. But when the app is longer in the background creating a Live Activity via Activity.request() throws an ActivityAuthorizationError.visibility. According to the documentation the LiveActivityIntent is able to workaround this background restriction but I get the same exception when I create the LiveActivity from the perform() method. Is there another API to create Live Activities? Do I need to prepare the LiveActivityIntent somehow?
Replies
1
Boosts
0
Views
115
Activity
3w
Significant change or restart app without location UIBackgroundModes key
Situation: We have an app that only uses location UIBackgroundModes key to restart our app on significant change events as we need it to connect with a BLE device (mounted in the car) when someone starts driving. We cannot use geofence as the car might be used by multiple people so position changes and we don't want to store locations and sent them to multiple users via our servers. So currently we use significant change and just ignore all other location data. During app review we got the following feedback: If the app does not require persistent real-time location updates, please remove the "location" setting from the UIBackgroundModes key. You may wish to use the significant-change location service or the region monitoring location service if persistent real-time location updates are not required for the app features. Question: How to use the significant-change location service without the "location" setting from the UIBackgroundModes key or is there any other way to start the app / connect with the BLE device when it is fully terminated/swiped away? Because the docs state that AuthorizationStatusAuthorizedAlways is required and without the UIBackgroundModes key location that wouldn't be triggered when app is in the background/swiped away. Reference: https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/LocationAwarenessPG/CoreLocation/CoreLocation.html#//apple_ref/doc/uid/TP40009497-CH2-SW8
Replies
3
Boosts
0
Views
114
Activity
3w
Resources for hardware developers?
Good morning, Apple devs. I'm looking for resources and help designing a BLE hardware peripheral that is compatible with iOS and iPad. I've seen the MFi program, but I've also seen plenty of peripheral devices that work with iOS and iPad that are not listed in the MFi compatibility lists. Can anyone refer me to the proper channels to get support for development of a hardware device? Thank you.
Replies
1
Boosts
0
Views
102
Activity
3w
Bluetooth audio packet alignment
We’re evaluating a Bluetooth device that supports Hands Free Profile (HFP) as the “Hands-Free Unit”. You can think of this as a Bluetooth telephone headset. This device interacts with our iOS application. We observed the following. The iPhone 17 HFP Wide-Band Speech (WBS) mSBC decoder requires the WBS packet (H2 header + mSBC frame) to be sent aligned. Aligned meaning, the H2 header must be first in every packet. The WBS packet cannot span multiple eSCO packets or else the iPhone will discard the audio. This is a different implementation than the iPad (iPad Pro 11-inch M4) , presumably due to Apple’s new N1 chip. In other words, we’ve identified that older iPhones and iPads do not require this alignment. They have implemented a stateful parser/decoder of the HFP WBS audio. A quick picture to help illustrate. The iPhone 17 requires: | Frame | Frame | Frame | Frame | However, a Bluetooth implementation we are evaluating does: | me Fra | me Fra | me Fra | me Fra | Does Apple intend to keep this implementation and continue discarding audio frames that are not aligned? Page 115 of the Bluetooth HFP 1.8 specification mentions at the bottom that this behavior is “left up to the implementation” but that the “synchronization header enables unaligned codec audio frames to be recovered by the receiving side.” We understand and acknowledge that one whole frame per eSCO packet is the intended, optimal method for delivering WBS mSBC audio for reduced jitter, latency, and memory usage. However, the more robust solution would be to maintain a stateful receiver as previously implemented. Any input would be appreciated.
Replies
3
Boosts
0
Views
141
Activity
3w
why bluetooth profile for ios disappeared?
https://developer.apple.com/feedback-assistant/profiles-and-logs/ There is no iOS profile in this link.
Replies
1
Boosts
0
Views
65
Activity
4w
BLE characteristic values swapped
Several of my users are reporting on at lest recent and current versions of iOS the value from one characteristic can be swapped with another. Originally I thought this was a library issue but it doesn't happen on Android and now a user with two iPhones using the exact same app and iOS 26.3 on both has the issue on one phone but not the other. I've gone into more detail here which also includes a little data dumping to prove the values between characteristics can be mixed up. https://github.com/dotintent/react-native-ble-plx/issues/1316 One user reported cycling Bluetooth on/off fixed the issue but the latest user says it does not. For the peripheral the services can only change if the device enters firmware update mode (in which case the service UUID is different). Otherwise the characteristics on a service never change. This would make it a strange one to be caching related since the cache should always be correct.
Replies
3
Boosts
0
Views
84
Activity
4w
Losing advertising packets when CBCentralManager scanForPeripheralsWithServices is left on
Right now, I am scanning for specific BLE peripherals with my iPad app, using this: [self.cbCentralManager scanForPeripheralsWithServices:serviceUUIDsToScanFor options:@{CBCentralManagerScanOptionAllowDuplicatesKey:@YES}]; I have the "CBCentralManagerScanOptionAllowDuplicatesKey" set true because I need to be able to detect when a peripheral is no longer advertising, so I capture each "didDiscoverPeripheral" callback and set a 3-second timer that notifies the user that that peripheral is no longer in range if another didDiscoverPeripheral hasn't been received in that time. The peripherals all advertise at 100ms intervals. What's weird is that if I leave the scan on for a long time, the advertising packets slow down, and eventually one of those timers times out, around about one or two minutes for the first instance, and then every 10-20 seconds after that. I've checked with ATS for all the BLE traffic, and there are indeed > 3-second gaps in the advertising packets that the iPad sees, so it's not my code introducing the gap. Is there some reason long-running scans should not be done on iPadOS (both 18 and 26.1 used)? I've tested out switching my scan to "stopScan" and restart it every 10 seconds, and that seems to have resolved the issue, but it's unclear why that would matter (and that does not seem like an appropriate use of the stop and start scans). Thanks!
Replies
3
Boosts
0
Views
158
Activity
Feb ’26
AirPods 4 Bluetooth Firmware Bug in L2CAP
Hello, I am a Bluetooth Engineer at Google investigating an interoperability bug between an Android device and AirPods 4. When requesting an L2CAP connection (with PSM = AVDTP) to the AirPods during SDP service discovery, The AirPods L2CAP layer incorrectly responds with a "refused - no resources available" status followed by a Pending status and a Success status. This violates the specification, which says that the request has been fully rejected after the refused status and should not receive followup responses. I suspect the "no resources available" response is a bug. This prevents A2DP from working with the AirPods. This bug does not exist with AirPods 2 firmware. Here is a packet capture: 1602 1969-12-31 16:07:04.805261 0.062473 localhost () Apple_6b:db:09 (AirPods) L2CAP 17 Sent Connection Request (AVDTP, SCID: 0x22c6) 1603 1969-12-31 16:07:04.810953 0.005692 controller host HCI_EVT 8 Rcvd Number of Completed Packets 1604 1969-12-31 16:07:04.811078 0.000125 Apple_6b:db:09 (AirPods) localhost () SDP 27 Rcvd Service Search Attribute Request : Device Information: [Bluetooth Profile Descriptor List 0x0009] 1605 1969-12-31 16:07:04.821249 0.010171 localhost () Apple_6b:db:09 (AirPods) SDP 19 Sent Service Search Attribute Response 1606 1969-12-31 16:07:04.876396 0.055147 controller host HCI_EVT 8 Rcvd Number of Completed Packets 1607 1969-12-31 16:07:04.876464 0.000068 Apple_6b:db:09 (AirPods) localhost () L2CAP 21 Rcvd Connection Response - Refused - no resources available (SCID: 0x22c6) 1608 1969-12-31 16:07:04.942539 0.066075 Apple_6b:db:09 (AirPods) localhost () SDP 41 Rcvd Service Search Attribute Request : Unknown: [Bluetooth Profile Descriptor List 0x0009] 1609 1969-12-31 16:07:04.951052 0.008513 localhost () Apple_6b:db:09 (AirPods) SDP 19 Sent Service Search Attribute Response 1610 1969-12-31 16:07:05.010605 0.059553 controller host HCI_EVT 8 Rcvd Number of Completed Packets 1611 1969-12-31 16:07:05.080593 0.069988 Apple_6b:db:09 (AirPods) localhost () SDP 27 Rcvd Service Search Attribute Request : GATT: [Bluetooth Profile Descriptor List 0x0009] 1612 1969-12-31 16:07:05.087636 0.007043 localhost () Apple_6b:db:09 (AirPods) SDP 19 Sent Service Search Attribute Response 1613 1969-12-31 16:07:05.209417 0.121781 controller host HCI_EVT 8 Rcvd Number of Completed Packets 1614 1969-12-31 16:07:05.279491 0.070074 Apple_6b:db:09 (AirPods) localhost () L2CAP 21 Rcvd Connection Response - Pending (SCID: 0x22c6) 1615 1969-12-31 16:07:05.280731 0.001240 Apple_6b:db:09 (AirPods) localhost () L2CAP 21 Rcvd Connection Response - Success (SCID: 0x22c6, DCID: 0x0406) Please file this bug with the AirPods Bluetooth team.
Replies
1
Boosts
0
Views
164
Activity
Feb ’26
Seeking advice consulting Bluetooth BLE iOS App build EXPO EAS. Native React.
I’m close to finishing my App build (using Rork.com) and need advice consulting on adding BLE Bluetooth functionality to connect to Cycling Sensors, speed cadence, watts, smart indoor cycling trainers, heart rate straps etc. My questions are as a complete beginner: 1: How much time is needed to set up BLE connections in Expo.dev using EAS build? 2: Where can I find a trustworthy tech to implement this? and on a second aspect for the app. I need someone to help set up REVENUECAT, for annual subscriptions. I’ve partly set it up for testing. How much time is needed here? many thanks for your time in advance for any help / assistance you’re able to provide. cherrs ben
Replies
0
Boosts
0
Views
76
Activity
Feb ’26
Can I trigger AudioRecordingIntent from a bluetooth device
I have a BLE device which my app connects to and can detect button presses. On a button press, I want my app to start recording using the AudioRecordingIntent. But my app doesn't work and throws a background error. Is there any reliable way I can get the app to start recording audio in the background?
Replies
2
Boosts
0
Views
144
Activity
Feb ’26
BLE advertising/scanning communication broken on iPhone 17 — CBPeripheralManager + CBCentralManager workflow
Environment: iPhone 17 / iPhone 17 Pro (Apple N1 chip) iOS 26.x Xcode 26 Framework: Flutter app with native iOS BLE library (CoreBluetooth) We have a production IoT app that communicates with BLE nodes (Nordic, PIC, EnOcean peripherals) using an advertising/scanning-based protocol — not GATT connections. The app broadcasts commands via CBPeripheralManager (advertising service UUIDs) and receives responses by scanning with CBCentralManager (reading manufacturer data and service UUIDs from advertisement packets). This workflow has been reliable across all iPhone models from iPhone 8 through iPhone 16 Pro Max. On iPhone 17 devices, we are experiencing multiple failures in this workflow. Architecture: Sending commands: We use CBPeripheralManager.startAdvertising() with CBAdvertisementDataServiceUUIDsKey to broadcast a UUID-encoded command to nearby nodes. Receiving responses: We use CBCentralManager.scanForPeripherals(withServices: nil, options: [CBCentralManagerScanOptionAllowDuplicatesKey: true]) and filter responses in centralManager(_:didDiscover:advertisementData:rssi:) by matching CBAdvertisementDataServiceUUIDsKey or CBAdvertisementDataManufacturerDataKey against expected UUID masks. Communication pattern: Advertise a command → stop advertiser → start scanner → wait for matching response → process result. Typical timeout is 1.5 seconds per exchange. Issues observed on iPhone 17: peripheralManagerDidStartAdvertising behaviour change After calling CBPeripheralManager.startAdvertising(:), the delegate callback peripheralManagerDidStartAdvertising(:error:) either fires with errors that did not occur on previous hardware, or advertising does not appear to reach the peripheral nodes at all. The same advertising payload works immediately when tested on iPhone 15/16. Is the N1 chip's Bluetooth 6 stack handling CBAdvertisementDataServiceUUIDsKey advertising differently? Are there new constraints on advertising payload size or format? Scanner returning fewer/no results with withServices: nil Our scanner uses scanForPeripherals(withServices: nil) because we need to read manufacturer data from advertisement packets and filter using a custom UUID mask. On iPhone 17, we observe significantly fewer didDiscover callbacks compared to iPhone 15/16 in the same physical environment, with the same nodes advertising. We understand that passing service UUIDs in withServices: is recommended, but our protocol requires reading raw manufacturer data bytes that aren't associated with a single service UUID — we use mask-based matching (e.g., filter mask 11110000-0000-0000-0000-000000000000 against scan results). Has the N1 chip changed the rate or filtering behaviour of unfiltered BLE scans? Is there a new throttling mechanism? Background scanning stops immediately When the app moves to background, scanning appears to stop entirely on iPhone 17 — even with bluetooth-central in UIBackgroundModes. On iPhone 16, background scanning continued (at reduced intervals) and delivered results for peripherals advertising filtered service UUIDs. Aggressive session termination on app backgrounding Our advertise-then-scan sequences (typically 1.5s round-trip) are being interrupted when the user briefly switches apps. The CBPeripheralManager stops advertising and the CBCentralManager stops scanning, causing timeout errors. This was not observed on previous iPhone models with the same iOS background mode configuration. Questions for Apple: Are there documented changes to CoreBluetooth behaviour on the N1 Bluetooth 6 chip that affect advertising-based (non-GATT) communication patterns? Has the scan response rate for scanForPeripherals(withServices: nil) been intentionally reduced on iPhone 17? Is CBCentralManagerOptionRestoreIdentifierKey now required for reliable background scanning on iPhone 17, or is this a known regression? Are there new advertising payload constraints (size, format, interval) that we should be aware of for the N1 chip? What we've tried: Added NSBluetoothAlwaysUsageDescription and NSBluetoothWhileInUseUsageDescription to Info.plist Confirmed Bluetooth permissions are granted Tested with identical BLE nodes that work on iPhone 15/16 Verified CBManagerState.poweredOn before all operations Any guidance or known workarounds would be greatly appreciated. Happy to provide sysdiagnose logs or a minimal reproducible sample project.
Replies
3
Boosts
0
Views
379
Activity
Feb ’26
iOS App never gets Bluetooth connection
I am developing an iOS App for a Bluetooth peripheral using SwiftUI with Swift 5 or 6. I have a few past attempts that got so far (connected to a peripheral), and some downloaded examples that connect to peripherals. Lately (last month or so), my current attempt never gets BleManager to start, and every attempt ends at my View that says 'please enable Bluetooth'. The Xcode console is totally blank with no print outputs. Coding Assistant suggested the init() in my @main structure could contain print("App initializing"), but even that never prints. Coding Assistant suggests: "• Open your project's Info.plist in Xcode. • Make sure UIApplicationSceneManifest is present and configured for SwiftUI, not referencing any storyboard. • Ensure UIMainStoryboardFile is not present (or blank)." but there is no info.plist because it is no longer required. Downloaded sample code runs and connects to peripherals, so Bluetooth is working on my iPhone and the Bluetooth device is accessible. My older attempts used to work, but now have the same problem. All attempts have "Enable Bluetooth to connect to Device" in the Privacy - Bluetooth Info.plist setting. Something is fundamentally wrong with many different code attempts. I have searched all the various settings for mention of SwiftUI or Storyboard, but not found them in working or failing projects. The downloaded code which works has minimum deployment iOS 14.0 and Swift Compiler Language Version Swift 5. My latest code attempt has minimum deployment iOS 16 and Swift 5. All code is target device iPhone (I am testing on iPhone 16e running iOS 26.2.1) and developing with Xcode 26.2 on MacBook Air M1 running the latest Tahoe. I do a Clean Build Folder before every test, and have tried re-starting both Mac and iPhone. How can my coding fail so spectacularly?
Replies
2
Boosts
0
Views
168
Activity
Feb ’26
BLE Scanning
iOS BLE Background Scanning Stops After Few Minutes to Hours Hi everyone, I'm developing a Flutter app using flutter_blue_plus that needs continuous BLE scanning in both foreground and background. Foreground scanning works perfectly, but background scanning stops after a few minutes (sometimes 1-2 hours). Current Implementation (iOS) Foreground Mode: Scans for 10 seconds with all target service UUIDs Batches and submits results every 10 seconds Works reliably ✅ Background Mode: Rotates through service UUIDs in batches of 7 Uses 1-minute batch intervals Maintains active location streaming (Geolocator.getPositionStream) Switches modes via AppLifecycleState observer // Background scanning setup await FlutterBluePlus.startScan( withServices: serviceUuids, // Batch of 7 UUIDs continuousUpdates: true, ); // Location streaming (attempt to keep app alive) LocationSettings( accuracy: LocationAccuracy.bestForNavigation, distanceFilter: 0, ); Lifecycle Management: AppLifecycleState.paused -> Start background mode AppLifecycleState.resumed -> Start foreground mode Questions: Is there a documented maximum duration for iOS background BLE scanning? My scanning stops inconsistently (few minutes to 2 hours). Does iOS require specific Background Modes beyond location updates to maintain BLE scanning? I have location streaming active but scanning still stops. Are there undocumented limitations when scanning with service UUIDs in background that might cause termination? Should I be using CoreBluetooth's state preservation/restoration instead of continuous scanning? Info.plist Configuration: <key>UIBackgroundModes</key> <array> <string>bluetooth-central</string> <string>location</string> </array> Additional Context: Total service UUIDs: ~20-50 (varies by company) Scanning in batches of 7 to work around potential limitations Android version works fine with foreground service Location permission: Always iOS 14+ target Any insights on iOS BLE background limitations or best practices would be greatly appreciated. Thanks!
Replies
1
Boosts
0
Views
132
Activity
Feb ’26