Book Image

Learning iBeacon

By : Craig Gilchrist
Book Image

Learning iBeacon

By: Craig Gilchrist

Overview of this book

Table of Contents (16 chapters)
Learning iBeacon
About the Author
About the Reviewers

Testing your application

We have finished building the app, and it's time to test. There's a lot of code in this tutorial, so don't be disheartened if it doesn't work the first time.

Testing the beacons

Just go through the steps again to see where you went wrong, or review the complete code from the download resources. Use the following steps:

  1. Tap guyButton before pressing the device's home button, thus sending the app to the background.

  2. Now, using the companion OS X app, start the beacon entitled Chapter 5: The hot guy, as shown in the upcoming figure. You should be presented with a push notification.

  3. Start the app, and you should see the distance being updated in distanceBarButtonItem.

  4. Press the home button again before turning off the beacon in the companion app.

  5. Wait for up to 15 seconds for the exit region event to fire, and again, you should be presented with a different push notification notifying you that you've exited the region.

  6. Perform steps 1 to 5 for the gal.

Running the companion application...