Giter Site home page Giter Site logo

jmcbeaconmanager's Introduction

JMCiBeaconManager

iBeacon is a name of technology that is enabling new location awareness possibilities for apps. "Leveraging Bluetooth Low Energy (BLE), a device with iBeacon technology can be used to establish a region around an object. This allows an iOS device to determine when it has entered or left the region, along with an estimation of proximity to a beacon."
๐Ÿ”ถ

An iBeacon Manager library was created to simplify your interactions with iBeacons. In essence it serves several roles:

  1. Checking the iBeacon permission matrix
  2. Registering & listening for nearby beacons
  3. Detecting nearby beacons
  4. Visualizing nearby beacons in a radar look like custom made user interface.

Version License Platform

alt tag alt tag

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

CocoaPods

JMCiBeaconManager is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "JMCiBeaconManager"

Manually

  1. Download and drop /JMCiBeaconManagerfolder in your project.
  2. Congratulations!

Usage

import JMCiBeaconManager

let beaconManager = JMCBeaconManager()

let kontaktIOBeacon = iBeacon(minor: nil, major: nil, proximityId: "f7826da6-4fa2-4e98-8024-bc5b71e0893e")
let estimoteBeacon = iBeacon(minor: nil, major: nil, proximityId: "B9407F30-F5F8-466E-AFF9-25556B57FE6D")

beaconManager.registerBeacons([kontaktIOBeacon, estimoteBeacon])

NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(beaconsRanged(_:)), name: iBeaconNotifications.BeaconProximity.rawValue, object: nil)

beaconManager.startMonitoring({ 
            
    }) { (messages) in
        print("Error Messages \(messages)")
}

/**Called when the beacons are ranged*/
func beaconsRanged(notification:NSNotification){
    if let visibleIbeacons = notification.object as? [iBeacon]{
        for beacon in visibleIbeacons{
            /// Do something with the iBeacon
        }
    }
}  

Add the key NSLocationAlwaysUsageDescription to your project info.plist file.

alt tag

Authors

Janusz Chudzynski, [email protected]

Felipe N. Brito, [email protected]

Contribute

We would love for you to contribute to JMCiBeaconManager, check the LICENSE file for more info.

Requirements

  • iOS 8.0+
  • Xcode 7.3

License

JMCiBeaconManager is available under the BSD license. See the LICENSE file for more info.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.