Skip to content
Ingresse iOS SDK
Swift Ruby Objective-C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Add Fastlane, Slather and CircleCI Sep 10, 2018
IngresseSDK.xcodeproj Merge remote-tracking branch 'origin/feature/two-factor' into release… Jul 30, 2019
IngresseSDK Increment version number 1.6.1 Sep 16, 2019
IngresseSDKTests Fix tests Sep 3, 2019
fastlane Add Podspec to version bump Dec 20, 2018
.gitignore
.swiftlint.yml
Gemfile
Gemfile.lock
IngresseSDK.podspec
LICENSE Organize files and support cocoaPods May 9, 2017
README.md

README.md

ios-sdk

Ingresse iOS SDK

Installation guide

Add this to your Podfile:

pod 'IngresseSDK'

Import SDK on your Swift class

import IngresseSDK

IngresseClient

Passing device info to SDK:

This info is used to identify your app and user device for better and faster problem solving

import Foundation
import UIKit

class UserAgent {
    static func getUserAgent() -> String {
        let currentDevice = UIDevice.current
        let osDescriptor = "iOS/ \(currentDevice.systemVersion)"
        let deviceModel = currentDevice.name

        let deviceDescriptor = "\(osDescriptor) [\(deviceModel)]"

        guard let bundleDict = Bundle(for: UserAgent.self).infoDictionary,
            let appName = bundleDict["CFBundleName"] as? String,
            let appVersion = bundleDict["CFBundleShortVersionString"] as? String
            else { return deviceDescriptor }

        let appDescriptor = "\(appName)/\(appVersion)"
        return "\(appDescriptor) \(deviceDescriptor)"
    }
}

Create a SDK Manager to your app

import IngresseSDK

class MySDKManager {
    static let shared = MySDKManager()

    var service: IngresseService!

    init() {
        let client = IngresseClient(
            apiKey: "<API_KEY>",
            userAgent: UserAgent.getUserAgent(),
            urlHost: "<YOUR_HOST>")

        self.service = IngresseService(client: client)
    }
}

IngresseService

After creating your SDK Manager you can use it to access your IngresseService

let service = MySDKManager.shared.service

You can use different types of service from IngresseService

AuthService

Used to login and get user data

let authService = service.auth
authService.loginWithEmail("example@email.com", andPassword: "******", onSuccess: (Callback block), onError: (Callback block))

EntranceService

Used to make entrance related operations such as guest-list download and checkin

let entranceService = service.entrance
entranceService.getGuestListOfEvent("EVENT_ID", sessionId: "SESSION_ID", userToken: "REQUIRED_USER_TOKEN", page: 1, delegate: MyClass)
You can’t perform that action at this time.