Bluetooth name caching

I've enjoyed using an existing app to connect over BLE to a camera which allows for photo transfer. For some reason though early on in iOS 18, it seems the bluetooth advertising name was corrupted. As a result, the camera no longer connects to the app. I've checked on another phone that the camera connects. I was wondering how to go about clearing the bluetooth cache or maybe specifically the BLE cache.

The existing app developer is non responsive and I'm assuming the issue will never be fixed.

I was planning on clearing the cache within my own personal unreleased app. Just wondering if there's any cache clearing API.

Can't say with certainty without knowing details, but if this is happening with multiple phones, it is likely that the camera has a different Advertised Name and GAP Name internally.

Once a device is connected, iOS will cache the GAP name, and will report that name instead of the Advertised Name in didDiscoverPeripheral() callback.

If the devices are not paired, the cached information may fall out of cache with time. The only way to clear this is to "forget" the device from Settings.

This is a user level action, and there is no API for it.

Thank you. On the other phones it’s working correctly with the correct name. I’ve tested a few devices and it seems to show the correct name on all except my main device. I’ve been using Bluetooth debugging apps that show the raw Bluetooth info.

Is there a way to manually forget a Bluetooth low energy device from settings? When paired there is no “i“ icon next to it so I can’t change the name or forget it.

I am not sure what may have happened then, that the wrong name was cached.

As for forgetting the camera, the (i) will appear if it is paired. If it is simply connected without pairing, then there won't be an (i), and unfortunately there is no way to clear the cache without resetting network settings, which is obviously an overkill.

Are you checking both CBAdvertisementDataLocalNameKey in the didDiscoverPeripheral() parameters and the CBPeripheral's name property? Would using one or the other solve your problem on this phone, perhaps at least temporarily?

I think I may have been mistaken when I said the advertised name was corrupted. It appears that the advertised name is updating correctly but the peripheral name isn't. It's different between the device where it works and where it doesn't.

On either device I cannot get the (i) to show up in bluetooth settings. I tried resetting network settings too but the peripheral name is still showing up different between the two devices.

Is there any other way to clear the cached peripheral name?

It also persists through iCloud backup/restores. The issue originally happened on an older iPhone but I have a new phone and the issue still exists.

Bluetooth name caching
 
 
Q