IOS UUID deprecated for the kernel

I am modifying an application that detects a device via Bluetooth BLE to display values ​​in a graph. Everything works fine (thanks to the help of one of you last week). The application was originally written by my husband some time ago, and during the discovery of the device, he used a verification code, for example:

NSLog(@" Failed to Connect to Peripheral : %@ with UUID: %@ ", peripheral, peripheral.UUID); 

or

 NSLog(@" Connected to Peripheral : %@ with UUID: %@ ", peripheral, peripheral.UUID); 

Before each of these lines (and a few more), I get warning messages that the UUID is out of date: first out of date in ios 7.0. Since quite a while I’ve been trying to figure out what it was replaced with, but on Google it’s not like the others people have the same problem, and when I go to the Apple Documentation: here

no mention of obsolescence.

I do not understand...

Can anyone help? Thanks

EDIT: ADD SOME INFORMATION

This is what I get on my computer in the console

enter image description here

+7
ios uuid deprecation-warning core-bluetooth
source share
3 answers

Update

I checked twice and the UUID property on CBPeer is also deprecated.

From the docs in Xcode, I found -

Resignation letter
Use the identifier property instead.

And if you use peripheral.identifier.UUIDString , you will not receive a failure warning.

+15
source share

So, just in case, anyone reads this: Here is a general way to find out what to use instead of the deprecated API call.
1) Mark outdated call
2) Right-click "Go to Definition"
3) Read what it says.

In the case of the UUID that was set here, the answer will be 2 lines below:

 @property (readonly, nonatomic) NSUUID *identifier NS_AVAILABLE(NA, 7_0); 
+3
source share

You can access the UUID of a service using CBAdvertiseDataServiceUUIDsKey in an advertisement on

 - (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI 
+2
source share

All Articles