Join Michael Lehman for an in-depth discussion in this video Scanning for peripherals, part of Programming the Internet of Things with iOS.
- Ready to type in some code?…Let's go.…So first we have to allocate an instance…of the core blue tooth central manager.…self.centralManager equals CBCentralManager alloc…and we want to say, initWithDelegate…and that's going to be us…and we don't need a special dispatch queue…so we're going to say nil.…And then, up here, in start scan,…we're going to say, if not self.bluetoothOn.…
We're going to log that and get out of here.…Otherwise when blue tooth is on…it will tell the central Manager…to start scanning, scanForPeripheralsWithServices.…Now here we have the option of specifying…a set of service UUIDs.…In this case we're going to say nil…because we don't want to scan…for a particular service but if you know…the service unique id of your particular…bluetooth device, you can avoid…having to scan for every bluetooth device…and then find the right device…and then go discover the services…but the purpose of this app is to be…a scanner so we're going to say…we want to have all peripherals.…
And then we have the option of deciding…
- Exploring the IoT universe
- Understanding sensors and effectors
- Connecting inputs and outputs
- Connecting to devices via Wi-Fi or Bluetooth
- Using Apple iBeacon
- Creating your own things with programmable hardware
- Using IFTTT to program things
- Exploring trends in IoT
Skill Level Intermediate
iOS 7 App Development New Featureswith Simon Allardice2h 14m Intermediate
1. The Internet of Things (IoT)
2. Exploring Things
3. Connecting to Things
4. Using Apple iBeacon
5. Creating Things
6. Managing Your Things
7. The Future of IoT
Next steps3m 4s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.