RedBearLab / iOS

Provides a BLE framework for developing BLE App on iOS/OSX platform using RBL BLE Service.
578 stars 288 forks source link

BLE_Framework/BLE.m:466:20: 'UUID' is deprecated: first deprecated in iOS 7.0 #5

Open jopiek opened 11 years ago

jopiek commented 11 years ago

Well, look at that... Apple seems to be getting rid of the UUID? Or is it just a compiler glitch? The UUID for CBPeripheral was introduced in iOS 5.

/../../.. ../BLE_Framework/BLE.m:466:20: 'UUID' is deprecated: first deprecated in iOS 7.0

What would be the solution?!

ghost commented 11 years ago

Yea I wonder when redbearlab can release a new BLE_Framework for iOS7. I have problem on both the UUID deprecated and the "isConnect" deprecated.

kevinpk commented 11 years ago

Johnny,

Replace

if(ble.activePeripheral.isConnected)

with

if(ble.activePeripheral.state == CBPeripheralStateConnected)

Sorry I can't help with what to do about UUID being deprecated. I came here to find that out as well!

Cheers, Kevin

jopiek commented 11 years ago

Thanks!

Greets Johan

Op 3 nov. 2013, om 16:29 heeft kevinpk notifications@github.com het volgende geschreven:

Johnny,

Replace

if(ble.activePeripheral.isConnected)

with

if(ble.activePeripheral.state == CBPeripheralStateConnected)

Sorry I can't help with what to do about UUID being deprecated. I came here to find that out as well!

Cheers, Kevin

— Reply to this email directly or view it on GitHub.

ghost commented 10 years ago

Yeah it helped thanks a lot

hayesmp commented 10 years ago

The UUID issue makes an App unbuildable in iOS 8.

It's unfortunate that Apple has flagged this willy-nilly because I think all the are concerned about are you using phone UUIDs in your code.

sunnycyk commented 10 years ago

If look at CBPeer.h, I think iOS8 now uses "identifier" which is instance of NSUUID.

afarber commented 9 years ago

Maybe: replace UUID by peripheral.identifier.UUIDString