Coder Social home page Coder Social logo

hassy84 / beaconregionmanager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from koutalou/beaconregionmanager

0.0 2.0 0.0 224 KB

Eddystone and iBeacon(region monitoring, ranging) library for iOS

License: MIT License

Objective-C 99.32% Ruby 0.68%

beaconregionmanager's Introduction

Beacon Region Manager

Pod Version Pod Platform Pod License

Beacon Region Manager is wrapper library for Region monitoring of geographical regions and beacon regions API, Sending iBeacon signal.

Requirements

  • You have added the .h/m files to your project.

  • Add 'NSLocationAlwaysUsageDescription' into your project Info.plist

Usage

#import "BRMBeacon.h"

include all of necessary classes.

BRMBeaconSendManger, BRMBeaconReceiveManager, BRMLocationReceivceManger will instanciate singleton after called sharedManager.

Send iBeacon signal

[[BRMBeaconSendManager sharedManager] startBeaconWithUUID:@"2290B76D-300E-40C1-A40A-38D28477ADCB" identifier:@"BRMBeacon" major:100 minor:100 second:5.0];

Receive iBeacon region monitoring and ranging.

BRMBeaconReceiveManager *beaconReceiveManager = [BRMBeaconReceiveManager sharedManager];
beaconReceiveManager.delegate = self;
beaconReceiveManager monitorBeaconRegionWithUuid:@"2290B76D-300E-40C1-A40A-38D28477ADCB" identifier:@"BRMBeacon"];

You can disable iBeacon ranging. (Default:enable)

beaconReceiveManager.allowRanging = NO;

You need to inherit BRMBeaconReceiveDelegate to set delegation.

@interface MyClass : NSObject<BRMBeaconReceiveDelegate>

Region monitoring delegates defined in BRMBeaconReceiveDelegate,

- (void)didUpdateRegionEnter:(NSString *)identifier;
- (void)didUpdateRegionExit:(NSString *)identifier;

Ranging delegates defined in BRMBeaconReceiveDelegate,

- (void)didRangeBeacons:(NSArray *)beacons identifier:(NSString *)identifier;

A device can not receive own iBeacon signal.

Receive location region monitoring.

BRMLocationReceiveManager *locationReceiveManager = [BRMLocationReceiveManager sharedManager];
locationReceiveManager.delegate = self;
locationReceiveManager monitorLocationRegionWithLatitude:35.681382 longitude:139.766084 distance:100.0 identifier:@"BRMLocation"];

You need to inherit BRMLocationReceiveDelegate to set delegation.

@interface MyClass : NSObject<BRMLocationReceiveDelegate>

Region monitoring delegates defined in BRMLocationReceiveDelegate,

- (void)didUpdateRegionEnter:(NSString *)identifier;
- (void)didUpdateRegionExit:(NSString *)identifier;

Receive Eddystone region monitoring and ranging.

BRMEddystoneReceiveManager *eddystoneReceiveManager = [BRMEddystoneReceiveManager sharedManager]
eddystoneReceiveManager.delegate = self;

You need to inherit BRMEddystoneReceiveDelegate to set delegation.

@interface MyClass : NSObject<BRMEddystoneReceiveDelegate>

Region monitoring delegates defined in BRMEddystoneReceiveDelegate,

- (void)didUpdateEnterUIDBeacon:(BRMEddystoneUIDBeacon *)brmUIDBeacon;
- (void)didUpdateEnterURLBeacon:(BRMEddystoneURLBeacon *)brmURLBeacon;
- (void)didUpdateEnterTLMBeacon:(BRMEddystoneTLMBeacon *)brmTLMBeacon;
- (void)didUpdateExitUIDBeacon:(BRMEddystoneUIDBeacon *)brmUIDBeacon;
- (void)didUpdateExitURLBeacon:(BRMEddystoneURLBeacon *)brmURLBeacon;
- (void)didUpdateExitTLMBeacon:(BRMEddystoneTLMBeacon *)brmTLMBeacon;

Ranging delegates defined in BRMEddystoneReceiveDelegate,

- (void)didRangeBeacons:(NSArray *)beacons;

You can get Eddystone beacon information from BRMEddystoneUIDBeacon, BRMEddystoneURLBeacon, BRMEddystoneTLMBeacon.

License

Beacon Region Manager is released under the MIT license. See LICENSE for details.

beaconregionmanager's People

Contributors

koutalou avatar

Watchers

James Cloos avatar  avatar

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.