1

Is there a way to get the iPhone UDID - or any other unique identifier - through Bluetooth? I looked around quite a bit and it seems like the answer is "only for jailbroken phones" which is not what I need.

If there's no such API, would I be able to get at the iOS SharedPrefernces and retrieve a value from it? In such a case I won't need the UDID - just an identifier I'll create myself when a user installs my app.

Eddy
  • 3,533
  • 13
  • 59
  • 89
  • the MAC address of the bluetooth device is probably the only identifier that is provided in BT connections, I guess – ddlab Mar 22 '15 at 12:27
  • Like you suggest, just create a NSUUID and store the string value in NSUserDefaults. – Justin Moser Mar 22 '15 at 12:27
  • @JustinMoser but would I be able to get it through bluetooth? Can you point me to the API? – Eddy Mar 22 '15 at 12:31
  • @ddlab can you point me to the API? – Eddy Mar 22 '15 at 12:32
  • Guess not, but google for Bluetooth DIS (device information service). Guess for security reasons you can get some infos about a device, only after it is paired to your device – ddlab Mar 22 '15 at 12:39
  • 1
    @Eddy Here is an answer I gave to a similar question that explains in detail how to create your own UUID that never changes and use it as a way to identify another device over bluetooth: http://stackoverflow.com/a/25131029/3055415 – Justin Moser Mar 22 '15 at 13:55
  • Can you give a bit more context? Bluetooth Low Energy or BR/EDR? Are the devices connected? If BLE, are the devices paired? What is the iPhone connecting to? Another iOS device? or a non-iOS device of which you control the firmware? – Martijn Thé Mar 30 '15 at 04:23
  • @MartijnThé the idea is to chat with people near you. You find them out through the bluetooth - so that our app doesn't have to be on all the time - and when you realize they are there you can turn on the app and chat with them. – Eddy Mar 31 '15 at 05:03

0 Answers0