Skip to content

About

Swift SDK for integrating with an Optable Data Connectivity Node from an iOS application.

Topics

Resources

Stars

1 star

Watchers

6 watching

Forks

Repository files navigation

Optable iOS SDK iOS SDK CI

SDK for integrating with an Optable Data Connectivity Node (DCN) from an iOS application.

Requirements

  • iOS 15.0 or later
  • Xcode 16 or later (the SDK is built in Swift 6 language mode)

Install

Swift Package Manager (SPM)

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

Once you have your Swift package set up, you can add this SDK as a dependency. Add it to the dependencies value of your Package.swift or the Package list in Xcode.

dependencies: [
    .package(url: "https://github.com/Optable/optable-ios-sdk", from: "1.3.0")
]

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website.

To integrate this SDK into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'OptableSDK'

Usage

Simplest usage example:

// Configure
let config = OptableConfig(tenant: "acmeco", originSlug: "my-app", host: "na.edge.optable.co")
let optableSDK = OptableSDK(config: config) // can instantiate multiple instances

// Use
let ids: [OptableIdentifier] = [
    .emailAddress("test@test.test"),
    .phoneNumber("+1234567890")
]
try await optableSDK.identify(ids)

tenant is your Optable tenant name, originSlug is the slug of your SDK source, and host is the regional service domain enabled for your account (na.edge.optable.co, au.edge.optable.co or eu.edge.optable.co). See the integration guides for details.

For more detailed usage guide, see our:

Demo Applications

The Swift and Objective-C demo applications show a working example of identify , targeting, profile and witness APIs, as well as integrations with the Google Ad Manager 360 ad server and Prebid Mobile, enabling the targeting of ads to audiences activated in the Optable DCN.

By default, the demo applications will connect to the Optable demo DCN.

The demo apps depend on the GAM Mobile Ads SDK for iOS and the Prebid Mobile SDK for iOS, and load ads from a GAM360 account operated by Optable.

Build

Cocoapods is required to build the demo-ios-swift and demo-ios-objc applications. After cloning the repo, simply cd into either of the two demo app directories and run:

cd demo-ios-swift

# Install dependencies
pod install

Then open the generated demo-ios-swift.xcworkspace or demo-ios-objc.xcworkspace in Xcode, and build and run from there.

About

Swift SDK for integrating with an Optable Data Connectivity Node from an iOS application.

Topics

Resources

Stars

1 star

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages