Latest 1.0.3
Homepage https://github.com/daisuke-t-jp/BeaconDetectManager
License MIT
Platforms ios 10.0, requires ARC
Authors

BeaconDetectManager

Platform
Language Swift%204.2
Cocoapods
Carthage compatible
Build Status

Introduction

iBeacon detect manager framework in Swift.

Documentation

Requirements

  • Platforms
    • iOS 10.0+
  • Swift 4.2+

Installation

Carthage

github "daisuke-t-jp/BeaconDetectManager"

CocoaPods

use_frameworks!

target 'target' do
pod 'BeaconDetectManager'
end

Usage

Import Framework

import BeaconDetectManager

Using Delegate

class ViewController: UIViewController, BeaconDetectManagerDelegate // <- ! {

    override func viewDidLoad() {
        super.viewDidLoad()

        BeaconDetectManager.sharedManager.delegate = self // <- !

Start Detecting

Start detect beacon with a proximityUUID. major and minor values will be wildcarded.

BeaconDetectManager.sharedManager.start("YOUR PROXIMITY UUID",
    eventOption: [.didEnterRegion, .didExitRegion, .didRangeBeacons])

Start detect beacon with a proximityUUID and major value. minor value will be wildcarded.

BeaconDetectManager.sharedManager.start("YOUR PROXIMITY UUID",
    eventOption: [.didEnterRegion, .didExitRegion, .didRangeBeacons],
    majorMinorArray: [BeaconDetectManager.MajorMinor(major: 0xabcd)])

Start detect beacon with a proximityUUID and major/minor values.

BeaconDetectManager.sharedManager.start("YOUR PROXIMITY UUID",
    eventOption: [.didEnterRegion, .didExitRegion, .didRangeBeacons],
    majorMinorArray: [BeaconDetectManager.MajorMinor(major: 0xabcd, minor: 0x0001),
        BeaconDetectManager.MajorMinor(major: 0xabcd, minor: 0x0010),
        BeaconDetectManager.MajorMinor(major: 0xabcd, minor: 0x0100),
        BeaconDetectManager.MajorMinor(major: 0xabcd, minor: 0x1000),
        BeaconDetectManager.MajorMinor(major: 0xdcba, minor: 0x0001),
        BeaconDetectManager.MajorMinor(major: 0xdcba, minor: 0x0010),
        BeaconDetectManager.MajorMinor(major: 0xdcba, minor: 0x0100),
        BeaconDetectManager.MajorMinor(major: 0xdcba, minor: 0x1000)])

Implementation Delegate

// Delegate called when disabled location service.
func beaconDetectManagerDidDisableLocationService(_ manager: BeaconDetectManager) {
}

// Delegate called when disabled bluetooth service.
func beaconDetectManagerDidDisableBluetoothService(_ manager: BeaconDetectManager) {
}

// Delegate called when user entered the specified region.
func beaconDetectManager(_ manager: BeaconDetectManager, didEnterRegion region: CLRegion) {
}

// Delegate called when user exited the specified region.
func beaconDetectManager(_ manager: BeaconDetectManager, didEnterRegion region: CLRegion) {
}

// Delegate called when one or more beacons are in range.
func beaconDetectManager(_ manager: BeaconDetectManager, didRangeBeacons beacons: [CLBeacon]) {
}

Latest podspec

{
    "name": "BeaconDetectManager",
    "version": "1.0.3",
    "summary": "iBeacon detect manager framework in Swift.",
    "description": "iBeacon detect manager framework in Swift.",
    "homepage": "https://github.com/daisuke-t-jp/BeaconDetectManager",
    "screenshots": "https://raw.githubusercontent.com/daisuke-t-jp/BeaconDetectManager/master/images/header.png",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "daisuke-t-jp": "[email protected]"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/daisuke-t-jp/BeaconDetectManager.git",
        "tag": "1.0.3"
    },
    "source_files": "BeaconDetectManager/BeaconDetectManager/*.{swift}",
    "swift_version": "4.2",
    "requires_arc": true
}

Pin It on Pinterest

Share This