How to Manage iBeacon Scanning in iOS using Mesosfer – Part 3

This tutorial is about How to Manage iBeacon Scanning in iOS using Mesosfer.

Table of Contents

  1. 1. Tutorial (Continued)
    1. 1.1. Define storyline cloud data
    2. 1.2. Query for storyline
    3. 1.3. Displaying alert dialog/notification
    4. 1.4. Send statistic log
    5. 1.5. Demo app
    6. 1.6. Download source

1. Tutorial

This tutorial was the 3rd part of How to Manage iBeacon Scanning using Mesosfer. You can follow the 2nd part here.

1.1. Define storyline cloud data

Go to your Mesosfer app -> Base -> Storyline, add this storyline below :

Within stories column, click Add Story button to add the details of storyline :

With the stories above, it means that when a beacon triggered an ENTER or EXIT event it will show alert/ notification TEXT. You can also define your own storyline parameters to match your own logic.

1.2. Query for storyline

Create a method called searchForStoryline with two parameters CBRegion and MFBeaconEvent in AppDelegate class. This method will search for Storyline data in Mesosfer cloud.

1.3. Displaying alert dialog/notification

Still in AppDelegate class, add a method called displayStoryline with a parameter of MFStorylineDetail.

1.4. Send statistic log

After getting storyline and show it, we need to save the statistic about what beacon’s event that was already triggered.

The complete AppDelegate code will be like this:

It’s done.

1.5. Demo app

1.6. Download source

You can download all the source code of this tutorial here.

Lead Mobile Software Engineer. Having more than 8 years in IT Consultant. Love working with new mobile platform technology. Expert in Android and iOS Mobile Development.