Skip to content

viafoura/sdk-ios

Repository files navigation

Viafoura

Viafoura iOS SDK

This library allows you to integrate Viafoura tools into a native iOS app.

Add the SDK to your project

Using CocoaPods

  1. Set dependency as follows: `pod 'ViafouraCore'
  2. Execute pod install in Terminal
  3. Open workspace file and run

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, adding Viafoura as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/viafoura/sdk-ios.git")
]

See our documentation

Please follow the official Viafoura iOS SDK documentation.

How to initialize the SDK?

  1. Initialize the SDK in application(application:didFinishLaunchingWithOptions). Make sure to replace SITE_UUID and SITE_DOMAIN with the values corresponding to your domain.
import ViafouraSDK

func application(_ application: UIApplication, 
                                didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]?) -> Bool { 
    ViafouraSDK.initialize(siteUUID: "SITE_UUID", siteDomain: "SITE_DOMAIN")
    return true
}