Latest 2.0.6
Homepage https://github.com/evokly/ios-sdk
License MIT
Platforms ios 8.0
Frameworks UIKit, Foundation, SystemConfiguration, CoreLocation, CoreBluetooth
Authors

logo

iOS SDK

beacons proximity marketing platform

Installation

Manual

  1. Add Evokly.framework to Embedded binaries & Linked Frameworks and Libraries in target settings General tab.

  2. import Evokly or @import Evokly;.

  3. In Build Phases add run script phase:
    bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Evokly.framework/strip-frameworks.sh"

  4. Add SwiftProtobuf 1.1.0 framework to the project

    For Obj-c target: under Build Settings, in section Build Options set Embedded Content Contains Swift Code to YES.

CocoaPods

use_frameworks!
pod 'Evokly'
pod 'SwiftProtobuf', '~> 1.1.0'

Carthage

github "evokly/ios-sdk"
// and then
carthage checkout

Using Evokly

Register

Get your Public API Key from https://evok.ly and pass it along with subdomain to register funcion.
In application(application:didFinishLaunchingWithOptions launchOptions:):

Evokly.register(subdomain: "mySweetDomain", publicApiKey: "Long api key")

Handle URL

before iOS 9:

func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?,  annotation: AnyObject) -> Bool {
   let handled = Evokly.handleURL(url, sourceApplication: sourceApplication)
   //Custom logic here
   return handled
}

for iOS 9 and later:

func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
    let handled = Evokly.handleURL(url, sourceApplication: options["UIApplicationOpenURLOptionsSourceApplicationKey"] as? String)
    //Custom logic here
    return handled
}

Handle notifications

Right click your Info.plist and Open as Source Code. Paste the following code before the last</dict>.

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>evokly-mySweetDomain</string>
        </array>
    </dict>
</array>    

Then in AppDelegate:

func application(application: UIApplication, didReceiveLocalNotification notification: UILocalNotification) {
    let handled = Evokly.handleNotification(notification)
     //Cusom logic here
}

Analytics

By default Evokly use UIDevice.currentDevice().identifierForVendor to track users. If you want to use Advertising Identifier, you can pass it to Evokly before registering.

Evokly.setAdvertisingIdentifier(someAdvertisingIdentifier)

Debuging

There is a debug screen to help you see what’s going on in Evokly. Present it with parent view controller.

func someButtonAction() {
    Evokly.presentDebugViewController(parent: self)
}

Location

Right click your Info.plist and Open as Source Code. Paste the following code before the last</dict>.

<key>NSLocationAlwaysUsageDescription</key>
<string>App needs your location to work with beacons.</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>App needs bluetooth to work with beacons.</string>

Latest podspec

{
    "name": "Evokly",
    "summary": "iOS library for Evokly beacon system.",
    "version": "2.0.6",
    "authors": {
        "Evokly S.A.": "[email protected]"
    },
    "homepage": "https://github.com/evokly/ios-sdk",
    "documentation_url": "https://github.com/evokly/ios-sdk",
    "source": {
        "git": "https://github.com/evokly/ios-sdk.git",
        "tag": "2.0.6"
    },
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "vendored_frameworks": "Evokly.framework",
    "module_name": "Evokly",
    "module_map": "Evokly.framework/Modules/module.modulemap",
    "platforms": {
        "ios": "8.0"
    },
    "frameworks": [
        "UIKit",
        "Foundation",
        "SystemConfiguration",
        "CoreLocation",
        "CoreBluetooth"
    ],
    "xcconfig": {
        "LIBRARY_SEARCH_PATHS": ""$(PODS_ROOT)/Evokly"",
        "HEADER_SEARCH_PATHS": ""${PODS_ROOT}/Evokly/Headers""
    }
}

Pin It on Pinterest

Share This