Skip to main content

Accessing the Airia Mobile SDK

Looking to learn how to download the Airia SDK? Check out this document to get started.

Access to the SDK is provided using a private Swift Package Registry. You will need to modify your local Swift Package Manager configuration in order to download the AiriaSDK package.

Obtain an Access Token

You can obtain an access token from your Airia account representative. The token will be used in the following step to allow the Swift Package Manager to access the private registry.

Configure Swift Package Manager

Add Airia Swift Package Registry

Use the swift package-registry set command to add the registry to your SPM config with the airia scope. If you are using Xcode to manage your Swift packages, then you need to add the registry to your global SPM config.

swift package-registry set --global --scope airia https://airia.jfrog.io/artifactory/api/swift/airia-swift-local

Authenticate with the Registry

Use the swift package-registry login command to authenticate with the package registry. This will store your token in the macOS Keychain.

swift package-registry login https://airia.jfrog.io/artifactory/api/swift/airia-swift-local --token <YOUR_ACCESS_TOKEN>

Once authenticated, verify in keychain access. Jfrog Token Verfiy View

Add AiriaSDK as a Dependency

Using Package.swift

If you are managing your dependencies in Package.swift, then add it to your dependencies array using .package(id:from:) with airia.AiriaSDK for the id.


import PackageDescription

let package = Package(
name: "Example",
products: [
.executable(name: "Example", targets: ["Example"])
],
dependencies: [
.package(id: "airia.AiriaSDK", from: "1.0.0")
],
targets: [
.executableTarget(
name: "Example",
dependencies: [
.product(name: "AiriaSDK", package: "Airia")
]
),
]
)

Using Xcode

If you are managing your dependencies through Xcode's UI, then you can search for the package using airia.AiriaSDK.

  1. Being by selecting your project in Xcode and navigating to the Package Dependencies tab. Then, click the plus icon '+' below the list of packages. Xcode Package Dependencies View

  2. You will be prompted to allow Xcode to access the registry token stored in the macOS Keychain. Enter your macOS User password, and click "Always Allow." Xcode Keychain Access Prompt Note: Sometimes this popup doesnot copme up as expected. Verify in Keychain access Access Control Check

  3. Finally search for the AiriaSDK by entering airia.AiriaSDK complete text (partial search does not work everytime) into the search field located in the top right corner. Then click "Add Package" in the bottom right corner. Xcode Package Search Window