stu371
stu371

Reputation: 1

iOS The system bluetooth failed to connect with the device

We have developed a smart wearable device by ourselves. Until last month, when the device leaves the Bluetooth connection range of the iPhone system and then returns to the range again, the system Bluetooth can successfully connect with the device automatically. But a few days ago, a customer’s mobile phone left the device After 1 hour of connection range, it can't connect back. And when we open the app developed by ourselves, we can't automatically connect back.

I can't figure out where the problem is. How can I locate the problem? Or can anyone tell me what is the reason for this phenomenon? Thank you very much

Problematic iPhone Xs Max, iOS 16.0.2

Phenomena about apps

  1. The app enters the foreground from the background, I did the following operations
NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:reconnectId];
NSArray *retPers = [self.cbcm retrievePeripheralsWithIdentifiers:@[uuid]];
CBPeripheral *peripheral = [retPers firstObject];
NSDictionary *options = @{CBConnectPeripheralOptionNotifyOnDisconnectionKey : @(YES),CBConnectPeripheralOptionEnableTransportBridgingKey : @(YES)};
[self.cbcm connectPeripheral:peripheral options:options];
  1. When I restarted my app, I found that it can successfully connect back automatically.

Upvotes: 0

Views: 52

Answers (0)

Related Questions