TLDR
TLDR

Reputation: 1278

CBPeripheralManagerState is Depreciated in iOS 10+. What is the alternative?

The BTLe documentation says I should check this Enum value before broadcasting.

Now that this is depreciated, what is my best alternative? No substitute is in the docs.

Also, the same issue applies to CoreLocation, where iBeacon also requires me to handle a delegate that uses this value as well.

Upvotes: 1

Views: 237

Answers (1)

davidgyoung
davidgyoung

Reputation: 64941

You can use CBManagerState. The new enumeration replaces two deprecated variants specific to a Bluetooth central role vs. a peripheral role.

it is a bit annoying that Apple's docs don't link to the replacement enumeration from the deprecated ones. But the good news is that the integer values are the same, so equality comparisons are valid even between the deprecated and new types.

Upvotes: 1

Related Questions