Not all apps want to be the central in the Bluetooth LE setup. An app can also be a peripheral that another central (possibly an app) connects to. In this case, the app needs to use the peripheral related classes and functions provided by Core Bluetooth. The process is similar to being a central and is familiar.
- [Instructor] Now we're going to switch gears a little bit.…Up until now we've been writing an iOS app…that acts as a Bluetooth LE central…and connects to the peripheral the sensor tag.…Going forward we're going to look at writing…a peripheral iOS app for a central to connect to.…For example, let's say you're writing an inventory app…that scans barcodes and sends them…to a central running on a computer…with the inventory, logic and database.…In this video we're going to create a new central…that will connect to our IOS peripheral app…we'll create later.…
We're going to be able to use the same iOS code…we wrote for our app to create a new project…as a Mac app for our new central.…We only need to make a few changes to our code.…We'll create the new Xcode project…and check the Bluetooth capabilities box.…We'll remove the memory warning code that's specific…to iOS and also change the base class…to NSViewController.…It's UIVController in iOS.…Also we're not going to store our peripheral UUID code.…We don't want the central trying to reconnect…
- Bluetooth Low Energy (BLE) basics
- Core Bluetooth key classes
- Scanning for peripherals
- Discovering services and characteristics
- Writing to a characteristic
- Reconnecting to peripherals
- Apps as peripherals
Skill Level Intermediate
1. BLE Basics
2. Scanning, Connecting, and Discovering
3. Writing to a Characteristic
Adding additional features10m 43s
4. An App as a Peripheral
Next steps1m 7s
- 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.