Core Bluetooth

RSS for tag

Communicate with Bluetooth 4.0 low energy devices using Core Bluetooth.

Posts under Core Bluetooth tag

176 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Specific Bluetooth speaker issue
Are there any cases where when connected to a specific Bluetooth device on an iPhone or iPad, the Bluetooth device connected at the same time is frequently disconnected or the app connected via CoreBluetooth is disconnected? Our app connects to an iPhone or iPad and connects to CoreBluetooth API to perform specific functions or operations. When a JBL Bluetooth speaker is connected, the connection is automatically disconnected during operation. When the JBL Bluetooth speaker is disconnected, the Bluetooth connection between our apps is not disconnected. It does not happen on all iPhones or iPads, but it seems to happen on some devices. Our app users are experiencing this issue with JBL Bluetooth speakers. So we are trying to replicate this phenomenon with our Bluetooth speaker, but it doesn't work. Has anyone else experienced something similar? I am wondering if this phenomenon can occur.
0
0
68
19h
AccessorySetupKit and BLE RRA
Currently (as of iOS 18 dev beta 4), if a BLE device supports RRA and the MAC address changes while the ASAccessorySession's picker is displayed a second entry is added to the picker (usually without a friendly name). Once in this state one picker item will work, the other will display a "Cannot Add Accessory" error. Are there any plans to improve this user experience in AccessorySetupKit or do you have any recommendations on how to better handle this use case? We currently have a work around for this in our existing pairing flow but it does not translate to ASDiscoveryDescriptor as it requires comparing previous BLE advertisements.
4
0
68
5h
Support for P2P Connectivity and Network Requests in the Background
We are currently developing an application that runs in the background and continuously scans for other nearby devices via peer-to-peer networking. Generally, the high-level goals are: Scan for nearby devices while the app is in the background state. We only need to discover devices that are also running our app. Read a small token of data from each peer device found (no need for full-duplex connection) Submit this token to our server via a background network request On Android we have demonstrated this functionality using both Bluetooth LE and WifiDirect service discovery, and background operation is easily achieved with Android services. We are currently trying to expand our application to support cross-platform compatibility between IOS and Android, including IOS<-->IOS and IOS<-->Android discovery (in the background). Is there a way to achieve this desired functionality on IOS?
2
0
90
1d
CBPeripheralmanager not able to keep connection after app re-launch
Hi guys, I am developing an iOS application that turns iPhone into a HID peripheral. I have successfully added services and characteristics, and it can be paired with a Windows PC and works as expected. However, after the app relaunch and services re-added, PC not able to re-connect to it automatically. It still shows "Paired" on the PC rather than "Connnected" and no subscribe event received from CB. The user has to remove the device and do the pair again. I think the reason is that a new peripheral manager created after re-launch, it doesn't have previous connections' information (uuid or secure key). Hence, PC not able to talk to it anymore. My questions are: Is it the real reason for this? Any chance app can store the peripheral manager or the connection information? So that can pick it up next run. Any chance can setup to "Just works" mode? Maybe can make the reconnection working? I have read thru the CB documents, and didn't find answer there. Just trying with the forum if any luck...
0
0
53
2d
CoreBluetooth Issue: App Not Reconnecting Automatically After Restart (Bluetooth Keyboard App)
Hello everyone, I'm experiencing an issue with CoreBluetooth in my Bluetooth keyboard app, and I'm hoping someone here might be able to help. Description My app uses CoreBluetooth to establish a connection between an iPhone and a computer, functioning as a Bluetooth keyboard. The app is built using Flutter, with custom native plugins for handling CoreBluetooth functionalities, and the app operates in the peripheral role. Here are the behaviors I've observed: When I turn Bluetooth on and off on both devices, the connection re-establishes automatically. When I move out of range and then come back within range, the connection re-establishes automatically. Rebooting both the app and the computer also results in an automatic reconnection. Issue However, when I force quit (kill) the app and then reopen it, the Bluetooth connection does not re-establish automatically. Steps Taken I've added the necessary restoration key in the Info.plist. I have written the willRestoreState function, but I have not called .add(service) within it because doing so causes errors related to adding duplicate services. I've ensured that the app's Bluetooth permissions and background modes are correctly set. I've reviewed the CoreBluetooth documentation but haven't found a solution that addresses this specific scenario. Questions Is there a specific method or approach I need to implement to ensure automatic reconnection after the app is restarted without causing duplicate service errors? Are there any best practices or common pitfalls I should be aware of when handling Bluetooth reconnections in CoreBluetooth? Could there be an issue with the state restoration process that I'm not aware of, or is there an alternative method to achieve the desired reconnection behavior? Any insights or suggestions would be greatly appreciated! Thank you in advance for your help. Best regards, Pairat Atichart
1
0
112
2d
iOS 18 Beta Version Bluetooth Issue
I am trying to find connected Bluetooth devices using CBCentralManager's retrieveConnectedPeripherals(withServices: [CBUUID]) method. I have been able to find connected devices by including ScanUUID in the [CBUUID] array. However, in the iOS 18 Beta Version, I am unable to find any devices using this method. I discovered that the solution is to include ServiceUUID in the array instead of ScanUUID. Can you please clarify if this is a change in specifications in iOS 18 Version or if it is a bug?
1
2
124
2d
AccessorySetupKit
I am trying to setup AccessorySetupKit. I have several questions: Is it possible to setup classic Bluetooth accessory? In documentation you say: "Each display item’s ASDiscoveryDescriptor needs to have a bluetoothCompanyIdentifier or bluetoothNameSubstring, and at least one of the following accessory identifiers: bluetoothServiceUUID Either ssid or ssidPrefix, which needs to have a non-zero length. It’s an error to supply both SSID and SSIDPrefix, and your app crashes if you do. A bluetoothManufacturerDataBlob and bluetoothManufacturerDataMask that are the same length. A bluetoothServiceDataBlob and bluetoothServiceDataMask that are the same length." Is it possible to have only bluetoothCompanyIdentifier and UUID ?
1
0
108
4d
ANCS registration failing repeatedly
We have BLE on a vehicle that acts as a peripheral and pairs with the user's iOS device as a central device. As we understand, the only way for a peripheral to be "remembered" for the next connection is registration with ANCS. If we don't register while being connected and then the user goes away, when he next time is in range, fresh pairing has to happen. Is that the right understanding? Before we register, we are discovering the ANCS on an iOS device, with UID for ANCS and connection handle as arguments. There are times when discovering API returns 0x06 (implying service not available). At times, we are able to discover the service and are able to register. We wanted to know if there is a deterministic way to ensure ANCS to be discoverable from the peripheral side? If not, is there another way (say any other service) by which the peripheral can take some action to be remembered?
1
0
147
2w
accessory kit on IOS18
Hi, we are developing a carpooling app. In our app, once, the car driver enters his car, the app connects automatically in the background to the car. The connection to the car is done either via CarPlay or Bluetooth. Currently, when setting up the app, the user has to define how the connection to the car is established. He can choose between three options: either 1)CarPlay, or 2)Bluetooth or 3)both. Is it correct, that starting with the AccessoyKit of IOS18, the user will only have to choose the device, he wants the app to be connected with? However, he no longer has to define the kind of connection, i. e. CarPlay or Bluetooth by which to connect to the device? So in future, users will be able to connect to their Car, but they do not even know, whether the connection is via Bluetooth or CarPlay? If that is the case, it would make our lives much easier;) Many thanks for your help! Greets, Simon
0
0
135
1w
Query Regarding Background Bluetooth Notification Handling in iOS
Hi, I am currently working on a mobile application for iOS that involves communication with a Bluetooth peripheral device, specifically a smart analog watch. I have some questions regarding the feasibility of certain aspects of the architecture and would appreciate your guidance. Project Overview: Functionality: The application connects to a Bluetooth peripheral (the analog smartwatch) and utilizes the Apple Notification Center Service (ANCS) to broadcast notifications to the peripheral. Notification Flow: When a notification arrives on the iPhone, and if the peripheral is connected via Bluetooth, ANCS broadcasts the notification to the peripheral. The peripheral sends the notification back to the mobile application via Bluetooth. The mobile application then sends a request to a server, which uses AI to determine if the notification needs to be displayed on the watch. If the server validates the notification, the mobile app triggers a vibration on the watch to indicate the notification. Current Status: I can receive notifications from my watch to the mobile application via Bluetooth when the app is in the foreground. Questions: I need this notification handling to work in the background or killed mode. My ideal solution involves a background service that, upon receiving a notification from the mobile app, sends a request to the server and, based on the server's response, sends a valid notification back to the watch via Bluetooth. Is it possible to implement such functionality in iOS? Specifically: Can an iOS application receive and handle Bluetooth notifications in the background or when the app is terminated? What are the best practices or recommended approaches for maintaining Bluetooth communication in background or killed mode? Are there any specific APIs or frameworks that can facilitate this kind of background operation? Thanks
1
0
159
2w
CoreBluetooth Advertising and Scanning Issue in iOS 18/iPadOS 18 Beta 3
Hello, Has anyone encountered issues with CoreBluetooth advertising and scanning between iOS 18/iPadOS 18 Beta 3 ? I'm want to know this is a bug or an intended change in behavior. Issue Summary: Central device on iOS 18/iPadOS 18 Beta 3 (foreground) and Peripheral device on iOS 17.5.1 (background) fail to communicate via BLE advertising. The reverse setup or using non-iOS 18 devices works as expected. Detailed Description: I am developing an iOS/iPadOS application using CoreBluetooth for advertising and scanning. Here are the specifics of my setup: The application uses a fixed BLE service UUID, and scanning is performed with the specified service UUID. Background Modes Uses Bluetooth LE accessories and Acts as a Bluetooth LE accessory are enabled to allow advertising and scanning even when the app is in the background. When the Central device is running iOS 18/iPadOS 18 Beta 3 and the app is in the foreground scanning, and the Peripheral device is running iOS 17.5.1 with the app in the background advertising, the Central device cannot receive the advertisements from the Peripheral device. ( CBCentralManagerDelegate.centralManager(_:didDiscover:advertisementData:rssi:) don't work.) In the reverse scenario (Central on iOS 17.5.1 in the foreground scanning, and Peripheral on iOS 18/iPadOS 18 Beta 3 in the background advertising), the advertisements are received correctly. Additionally, advertisements are received correctly in cases where both devices are not on iOS 18/iPadOS 18. I am wondering if anyone else has encountered this issue or if there is any information available regarding whether this is a bug or an intended behavior change in iOS 18/iPadOS 18. Thank you.
1
1
310
2w
Connect a Mac and a Watch via Core Bluetooth
Hello! I currently have a pair of apps that can connect a Mac and an iPhone and communicate to each other. I've been trying to do the same between a Mac and a Watch. In my current implementation, the Mac is the central and the iPhone is a peripheral. But according to some internet search, it seems that Watch can only be the central. Is this true, and still the case now, please? If so, can I use the Watch as the central and the Mac as a peripheral? Thank you!
1
0
158
2w
AccessorySetupKit Picker does not show device as expected, console logs show device discovered
I'm trying to get the ASK Sample to discover and connect to a device using a 16-bit uuid. In my case, I have a few fitness sensors laying around like heart rate monitors and cycling sensors. Specifically, I've configured the following descriptor to be shown in the picker: private static let heartRateMonitor: ASPickerDisplayItem = { let descriptor = ASDiscoveryDescriptor() descriptor.bluetoothServiceUUID = CBUUID(string: "180D") return ASPickerDisplayItem(name: "Heart Rate Monitor", productImage: UIImage(named: "PolarH10")!, descriptor: descriptor) }() 100% another app on the device using an unfiltered scan can find this device, so I know the phone can see it. Also, the settings app Bluetooth screen sees it too. When the picker is active for this descriptor, in console I see the device is being discovered and it is matching the underlying filter. However the picker doesn't show the device. Received 'start active Unspecified scan' request , without duplicates, duration:unlimited, UUIDs [ E56A082E-C49B-47CA-A2AB-389127B8ABE3 E56A082E-C49B-47CA-A2AB-389127B8ABE4 0x180D ] on 1M PHY from session "com.apple.deviceaccessd-central-727-198" Matched UUID 0x180D for device "D3030A85-BBB9-6C0D-53C4-6697898B2E4B" This is an apparent bug: FB14078940 - AccessorySetupKit: ASDiscoveryDescriptor does not appear to identify 16-bit UUIDs like the Heart Rate Service/Profile UUID After more tinkering, I did discover that if I connect the device in the settings app, and keep it connected, the picker will find the device immediately. I assume it is under the hood it is calling this function or the internal implementation: https://developer.apple.com/documentation/corebluetooth/cbcentralmanager/retrieveconnectedperipherals(withservices:) This is still not expected, a developer should be able to discover and connect an accessory directly in their app. Noteworthy, I also found that ALL apps in the Settings app list the accessory once paired, which is totally not expected: FB14170263 - Settings: Viewing accessories in settings app for all apps show the accessory paired with another application P.S. forum moderators, there is no tag for 'AccessorySetupKit' which is the technology I'd like to tag this with. Last tested with iOS 18 developer beta 2.
0
0
181
3w
Bluetooth audio becomes choppy on iOS with entitlement error but works just fine on MacCatalyst
I am converting some old objective-C code deployed on ios 12 to swift in a WKWebView app. Im also developing the app for Mac via MacCatalyst. the issue im experiencing relates to a programmable learning bot that is programmed via block coding and the app facilitates the read and writes back and forth. the audio works via a A2DP connection the user sets manually in their settings, while the actual movement of the robot is controlled via a BLE connection. Currently the code works as intended on MacCatalyst, while on iPhone, the audio being sent back to the robot is very choppy and sometimes doesn't play at all. I apologize for the length of this, but there is a bit to unpack here. First, I know there has been a few threads posted about this issue, this one that seems similar but went unsolved https://forums.developer.apple.com/forums/thread/740354 as well as this one where apple says it is "log noise" https://forums.developer.apple.com/forums/thread/742739 However I just find it hard to believe that this issue seems to be log noise in this case. Mac Catalyst uses a legacy header file for WebKit, and im wondering if that could be part of the issue here.I have enable everything relating to bluetooth in my info plist file as the developer documents say. In my app sandbox for mac catalyst I have the permissions set for bluetooth as well there. Here are snippets of my read and write function func readFunction(session: String){ // Wait if we are still waiting to hear from the robot if self.serialRxBuf == ""{ self.emptyReadCount += 1 } if (!self.serialRxWaiting){ return } // Make sure we are waiting for the correct session if (Int(session) != self.serialRxSession){ return } self.serialRxWaiting = false self.serialRxSession += 1 let buf = self.serialRxBuf self.serialRxBuf = "" print("sending Read: \(buf)") self.MainWebView.evaluateJavaScript(""" if (serialPort.onRead) { serialPort.onRead("\(buf)"); } serialPort.onRead = null; """ ,completionHandler: nil) } // ----- Write function for javascript bluetooth interface ----- func writeFunction(buf: String) -> Bool { emptyReadCount = 0 if((self.blePeripheral == nil) || (self.bleCharacteristic == nil) || self.blePeripheral?.state != .connected){ print("write result: bad state, peripheral, or connection ") // in case we recieve an error that will freeze react side, safely navigate and clear bluetooth information. if MainWebView.canGoBack{ MainWebView.reload() showDisconnectedAlert() self.centralManager = nil // we will just start over next time self.blePeripheral = nil self.bleCharacteristic = nil self.connectACD2Failed() return false } return false } var data = Data() var byteStr = "" for i in stride(from: 0, to: buf.count, by: 2) { let startIndex = buf.index(buf.startIndex, offsetBy: i) let endIndex = buf.index(startIndex, offsetBy: 2) byteStr = String(buf[startIndex..<endIndex]) let byte = UInt8(byteStr, radix: 16)! data.append(byte) } guard let connectedCharacteristic = self.bleCharacteristic else { print("write result: Failure to assign bleCharacteristic") return false } print("sending bleWrite: \(String(describing: data))") self.blePeripheral.writeValue(data, for: connectedCharacteristic, type: .withoutResponse) print("write result: True") return true } Here is what the log looks like when running on mac catalyst, which works just fine sending bleWrite: 20 bytes write result: True sending Read: sending Read: 55AA55AA0B0040469EE6000000000000000000ED sending bleWrite: 20 bytes write result: True sending Read: sending Read: sending Read: 55AA55AA0B0040469EE6000000000000000000ED sending bleWrite: 20 bytes write result: True sending Read: 55AA55AA0B0040469EE6000000000000000000ED sending bleWrite: 20 bytes write result: True sending Read: 55AA55AA0B0040EDCB09000000000000000000ED sending bleWrite: 20 bytes write result: True sending Read: sending Read: 55AA55AA0B00407A7B96000000000000000000ED sending bleWrite: 20 bytes write result: True Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}> 0x12c0380e0 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebKit Media Playback' for process with PID=36540, error: Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)} and here is the log from when we are running the code on iPhone (trying to save space here) I apologize for the length of this post, however submitting a test project to apple developer support just isn't possible with the device thats in use. Any help at all is appreciated. i've looked at every permission, entitlement, background processing, and tried every solution that I could find to no avail.
0
0
337
4w
The status of version x.x.x has changed to Invalid Binary
We have developed a software called xxxxxxxxxx, using the "react-native-star-io10" library (version 1.3.0) to communicate with Star Micronic printers. In older versions, we utilized this library solely for local network printer communication. In an unreleased test version, we attempted to add Bluetooth printer connectivity to the project. However, due to prolonged validation and approval processes by Star Micronic, we opted to remove this feature from the current version of the project. Currently, we are facing a major issue: when we remove the Bluetooth permission keys from the Info.plist file and archive the project, upon upload, we encounter the error "The status of version x.x.x has changed to Invalid Binary." However, when we add the Bluetooth permission keys back to the application, archive the file, and upload it, the software ultimately gets rejected during the In Review phase. We are not utilizing Bluetooth in this version of the software and wish to deliver this version to our users. We plan to add the Bluetooth feature in a future release. Please advise on how we can resolve this issue or if there are specific changes needed in our project asap. Thank you for your attention.
0
0
277
3w
Access Bluetooth in system daemon - Unauthorized
Hello, as the title says, I am trying to access Bluetooth in a system daemon. I am running on MacOS Sonoma 14.5. When initializing Bluetooth, my daemon received Unauthorized state. I have tried to add my daemon in the system settings (System Preferences > Security & Privacy > Privacy > Bluetooth) "Allow applications to access Bluetooth" by adding the program executable path defined by the entry Program of my system daemon as suggested here: https://developer.apple.com/forums/thread/662459. But I am still having the issue. Writing a system daemon with Bluetooth is not my final goal. The bigger picture is the smartcard reader driver with Bluetooth access which as the same issue and the solution is probably related. I do not remember how but my smartcard reader driver use to work with Bluetooth but it does now with the same Unauthorized error. As far as I can see daemon and smartcard drivers does not have support for entitlement. Here are the logs for my sample system daemon: my_daemon [0x6000011b0000] activating connection: mach=true listener=false peer=false name=com.apple.server.bluetooth.le.att.xpc bluetoothd [0x7f804828e8a0] activating connection: mach=false listener=false peer=true name=com.apple.server.bluetooth.le.att.xpc.peer[76672].0x7f804828e8a0 bluetoothd Received XPC message "CBMsgIdCheckIn" from session "" bluetoothd Received XPC check-in from session "my_daemon-5555494498236e3b5e2e395b93c13af176769937-peripheral-76672-67" fAccessLevel 0 fProgrammaticPairing 0 fLimitedForMediaAccess 0 bluetoothd Access level is less than kXPCAccessLevelSystem for session "my_daemon-5555494498236e3b5e2e395b93c13af176769937-peripheral-76672-67". Restricted state operation not allowed bluetoothd Sending 'session attached' event for session "my_daemon-5555494498236e3b5e2e395b93c13af176769937-peripheral-76672-67" bluetoothd Attached session for "my_daemon-5555494498236e3b5e2e395b93c13af176769937-peripheral-76672-67" with session: 0x7f804802d1b0, session handle: 0xef8d0000 bluetoothd Registering peripheral session "my_daemon-5555494498236e3b5e2e395b93c13af176769937-peripheral-76672-67" with backgrounding: off, persistence: off (CBSR) restoreID: (null) bluetoothd Error getting Application State for <private>: <private>, 3 bluetoothd Error getting Application State for <private>: <private>, 3 bluetoothd Session "my_daemon-5555494498236e3b5e2e395b93c13af176769937-peripheral-76672-67" tccRequired : 1 bluetoothd ReadyForTCC. TCC required:1 fLimitedForMediaAccess:0 fDeviceAccessForMediaExtension:0 bluetoothd Session "my_daemon-5555494498236e3b5e2e395b93c13af176769937-peripheral-76672-67" : needsRestrictedStateOperation = 0, overrideRestrictedState = 0 , denylistMode = 0, receivesControllerBTClockEvents=0 my_daemon Received CBMsgIdReadyForTCC my_daemon Running performTccCheck CBManager tccAvail 1, tccRequired 1 my_daemon TCC required my_daemon [0x6000011b8000] activating connection: mach=true listener=false peer=false name=com.apple.tccd my_daemon [0x6000011b8000] failed to do a bootstrap look-up: xpc_error=[3: No such process] my_daemon [0x6000011b8000] invalidated after a failed init my_daemon send_message_with_reply(): user tccd unavailable, sending 0x600000ab4000 to system tccd my_daemon [0x6000011b4000] activating connection: mach=true listener=false peer=false name=com.apple.tccd.system tccd [0x7fd4d1f7ed80] activating connection: mach=false listener=false peer=true name=com.apple.tccd.system.peer[76672].0x7fd4d1f7ed80 tccd REQUEST: tccd_uid=0, sender_pid=76672, sender_uid=0, sender_auid=-1, function=TCCAccessRequest, msgID=76672.1 tccd AUTHREQ_CTX: msgID=76672.1, function=<private>, service=kTCCServiceBluetoothAlways, preflight=no, query=1, client_dict=(null), daemon_dict=<private> tccd AUTHREQ_ATTRIBUTION: msgID=76672.1, attribution={requesting={TCCDProcess: identifier=my_daemon-5555494498236e3b5e2e395b93c13af176769937, pid=76672, auid=0, euid=0, binary_path=/Users/olivier/daemon/my_daemon}, }, tccd AUTHREQ_SUBJECT: msgID=76672.1, subject=/Users/olivier/daemon/my_daemon, tccd Refusing TCCAccessRequest for service kTCCServiceBluetoothAlways from client Sub:{/Users/olivier/daemon/my_daemon}Resp:{TCCDProcess: identifier=my_daemon-5555494498236e3b5e2e395b93c13af176769937, pid=76672, auid=0, euid=0, binary_path=/Users/olivier/daemon/my_daemon} in background session tccd AUTHREQ_RESULT: msgID=76672.1, authValue=0, authReason=5, authVersion=1, error=(null), tccd REPLY: (0) function=TCCAccessRequest, msgID=76672.1 my_daemon [0x6000011b4000] invalidated after the last release of the connection object bluetoothd Received XPC message "CBMsgIdTCCDone" from session "my_daemon-5555494498236e3b5e2e395b93c13af176769937-peripheral-76672-67" tccd [0x7fd4d1f7ed80] invalidated after getting a no-senders notification - client is gone bluetoothd [0x7f80482820f0] activating connection: mach=true listener=false peer=false name=com.apple.tccd.system tccd [0x7fd4d32585f0] activating connection: mach=false listener=false peer=true name=com.apple.tccd.system.peer[169].0x7fd4d32585f0 tccd REQUEST: tccd_uid=0, sender_pid=169, sender_uid=0, sender_auid=-1, function=TCCAccessRequest, msgID=169.48 tccd [0x7fd4d313d880] activating connection: mach=true listener=false peer=false name=com.apple.tccd tccd [0x7fd4d313d880] failed to do a bootstrap look-up: xpc_error=[3: No such process] bluetoothd [0x7f80482820f0] invalidated after the last release of the connection object bluetoothd Bluetooth user permission alwaysAuth: denied tccd [0x7fd4d313d880] invalidated after a failed init tccd FORWARD: to=com.apple.tccd/0, request: { require_purpose=<xpc_null> service="kTCCServiceBluetoothAlways" function="TCCAccessRequest" preflight=true target_token={pid:76672, auid:-1, euid:0} TCCD_MSG_ID="169.48" background_session=false } tccd REPLY: from=com.apple.tccd, reply: { XPCErrorDescription="Connection invalid" } tccd forwardMessage error: Connection invalid. tccd [0x7fd4d3152bf0] activating connection: mach=false listener=false peer=true name=com.apple.tccd.system.peer[169].0x7fd4d3152bf0 bluetoothd [0x7f80482820f0] activating connection: mach=true listener=false peer=false name=com.apple.tccd.system tccd REQUEST: tccd_uid=0, sender_pid=169, sender_uid=0, sender_auid=-1, function=TCCAccessRequest, msgID=169.49 tccd [0x7fd4d32585f0] invalidated after getting a no-senders notification - client is gone tccd [0x7fd4d1f4c810] activating connection: mach=true listener=false peer=false name=com.apple.tccd tccd [0x7fd4d1f4c810] failed to do a bootstrap look-up: xpc_error=[3: No such process] tccd [0x7fd4d1f4c810] invalidated after a failed init tccd FORWARD: to=com.apple.tccd/0, request: { require_purpose=<xpc_null> service="kTCCServiceBluetoothAlways" function="TCCAccessRequest" preflight=true target_token={pid:76672, auid:-1, euid:0} TCCD_MSG_ID="169.49" background_session=false } tccd REPLY: from=com.apple.tccd, reply: { XPCErrorDescription="Connection invalid" } tccd forwardMessage error: Connection invalid.
1
0
310
Jun ’24
Maximum Number of Bluetooth Pairings (not connections)
Hello, Our app is going to be used in an industrial setting where users will connect to many devices a day via Bluetooth to complete an installation process. They will only connect to one device at a time, so connection limit isn't an issue. What we're wondering about is the limit on number of pairings (found in Settings > Bluetooth > MY DEVICES). This is important because pairings can't be removed programatically. I seem to remember reading somewhere the limit was ~30 devices, but I can't find that document anymore. Does anyone know if this limit is correct, or where I could find a document regarding this?
1
0
231
Jun ’24
Device not discoverable by AccessorySetupKit
I set up my app very similar to the sample app, putting the Service UUID in the plist and descriptor, I am able to see the picker but when my device is advertising, it doesn't seem to be responding to it. I see it stuck on "Discovering" and then it times out saying "Make sure the accessory is nearby and ready to connect". I also noticed that when I remove the ASK code but leave in the ASK fields in the info plist, my CBManagerAuthroization state is always "not determined". Can anyone help me troubleshoot these 2 issues? Perhaps they are related?
1
0
219
Jun ’24
Music is not being played through BLE connected headphone on iPhone
I have created a demo iOS app to create BLE connection with surrounding headphone. I am able to connect to headphone successfully through my demo iOS app. I can also see in iPhone Bluetooth Setting that headphone is connected but when i am playing music from Spotify/YouTube then music is not being played through headphone. It is still using iPhone speakers. First i am scanning sarounding bluetooth Devices through CBCentralManager and then connecting one of the found device. cBCenteralManager.scanForPeripherals(withServices: nil, options: nil) For connecting: cBCenteralManager.connect(peripheral, options: nil) Do i need to make any code changes while connecting via BLE? I am expecting when i am connecting to headphone via my Demo app. Same connection is visible in iPhone Bluetooth setting too then when i play music on spotify/youtube then sound should be played on headphone and not on iPhone speakers.
2
0
261
Jun ’24