This library allows you to integrate Viafoura tools into a native iOS app.
Using CocoaPods
- Set dependency as follows: `pod 'ViafouraCore'
- Execute
pod install
in Terminal - Open workspace file and run
Using Swift Package Manager
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")
]
Please follow the official Viafoura iOS SDK documentation.
- 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
}