Skip to main content

iOS Installation

Add the Lovina Chat SDK to your iOS project. The SDK requires iOS 15.0+, Swift 5.9+, and Xcode 15+. See Compatibility for the full version matrix.

The recommended way to install is from Lovina's private Nexus Swift Package Registry — the Swift Package Manager resolves the SDK by its package identity. If you can't reach the registry, see Alternative: manual XCFramework at the end.

1. Configure the Nexus registry

The SDK is published to Lovina's private Nexus Swift registry under the package identity lovina.lovina-chat-sdk.

Point Swift Package Manager at the registry (requires SwiftPM 5.9+):

swift package-registry set https://packages.ailovina.com/repository/swift-releases/

Then authenticate with your Nexus username and password (ask your Lovina administrator for an account with read access to the swift-releases repository):

swift package-registry login https://packages.ailovina.com/repository/swift-releases/login \
--username "your-nexus-username" \
--password "your-nexus-password"

On macOS, SwiftPM stores these in the login Keychain.

CI / automation: skip the interactive login and pass credentials as environment variables instead — they take precedence over the Keychain and .netrc:

export SWIFTPM_REGISTRY_LOGIN="your-nexus-username"
export SWIFTPM_REGISTRY_PASSWORD="your-nexus-password"

Why not a token? Unlike the npm registry, the Swift Package Registry protocol has no token-exchange endpoint, and Nexus Repository OSS does not offer user tokens (that feature is Nexus Pro only). Swift consumers therefore authenticate with account credentials — use a dedicated read-only service account rather than a personal login.

2. Add the dependency

Swift Package Manager (Package.swift)

Declare the package by its registry identity and reference the LovinaChatSDK product:

dependencies: [
.package(id: "lovina.lovina-chat-sdk", from: "{version}")
],
targets: [
.target(
name: "YourApp",
dependencies: [
.product(name: "LovinaChatSDK", package: "lovina.lovina-chat-sdk")
]
)
]

Xcode

  1. Make sure you've run the swift package-registry set and login commands above so Xcode can reach the registry.
  2. In Xcode, go to File → Add Package Dependencies…
  3. Enter the package identity lovina.lovina-chat-sdk and choose the version rule (e.g. Up to Next Major from {version}).
  4. Add the LovinaChatSDK library product to your app target.

Requirements

RequirementMinimum
iOS deployment target15.0+
Swift5.9+
Xcode15+

Verify Installation

Import the SDK in any Swift file to confirm it is linked correctly:

import LovinaChatSDK

Build the project. If it compiles without errors, the SDK is installed.

Alternative: manual XCFramework

If you don't have access to the Nexus registry (for example, an air-gapped build), you can vendor the prebuilt XCFramework directly.

  1. Download the latest ios-{version}.xcframework.zip from the releases page.
  2. Unzip it to get LovinaChatSDK.xcframework, then:
    • Drag LovinaChatSDK.xcframework into your Xcode project navigator.
    • In your target settings, go to General → Frameworks, Libraries, and Embedded Content.
    • Set LovinaChatSDK.xcframework to Embed & Sign.
your-app/
├── YourApp/
├── YourApp.xcodeproj
└── Frameworks/
└── LovinaChatSDK.xcframework/
├── ios-arm64/
└── ios-arm64_x86_64-simulator/

To consume the same zip through SwiftPM without the registry, host it yourself and reference it as a binary target:

// Package.swift
targets: [
.binaryTarget(
name: "LovinaChatSDK",
url: "https://your-storage.com/ios-{version}.xcframework.zip",
checksum: "sha256-hash-here"
)
]

Generate the checksum with:

swift package compute-checksum ios-{version}.xcframework.zip

Next Steps

Once installed, head to Usage to integrate the chat widget into your app.