Dependencies

Relevant source files

This document covers external dependencies used by the LinkSDK, focusing on dependency management, version control, and integration patterns. The primary external dependency is the QuantumIOS framework, which provides core security and web content handling capabilities.

For information about the SDK's internal architecture and component relationships, see Core Architecture.

External Dependencies Overview

The LinkSDK has minimal external dependencies, with QuantumIOS being the primary external framework. The SDK leverages standard iOS frameworks (UIKit, WebKit, SafariServices) that are part of the iOS platform.

Dependency Hierarchy

Security Operations

UI Components

Web View Rendering

Browser Integration

LinkSDK Package

QuantumIOS Framework
v3.17.0

UIKit
(iOS Platform)

WebKit
(iOS Platform)

SafariServices
(iOS Platform)

Foundation
(iOS Platform)

Sources: Package.swift18-23 LinkSDK/TrueAuthWebViewController/TrueAuthWebViewController.swift8-11

QuantumIOS Framework Integration

QuantumIOS is the core external dependency, providing security operations and web content handling capabilities. The framework is pinned to an exact version to ensure stability.

QuantumIOS Configuration in Package Manifest

Configuration Aspect Value Purpose
Repository URL https://github.com/atomicfi/quantum-ios.git Source location
Version Constraint exact: "3.17.0" Pin to specific version
Product Name QuantumIOS Framework import name
Linker Setting .linkedFramework("QuantumIOS") Framework linking

The dependency is configured with exact version pinning to prevent unexpected updates:

dependencies: [\
    .package(\
        url: "https://github.com/atomicfi/quantum-ios.git",\
        exact: "3.17.0"\
    )\
]

Sources: Package.swift18-23

QuantumIOS Usage Patterns

QuantumIOS Operations

creates

provides

provides

initialize(token:view:controller:)

goto(url:)

cleanup()

TrueAuthWebViewController

Quantum()
Class Instance

WKWebView
Web Container

UIViewController
Parent Controller

initialize(token, view, controller)

goto(url)

cleanup()

Sources: LinkSDK/TrueAuthWebViewController/TrueAuthWebViewController.swift27-28 LinkSDK/TrueAuthWebViewController/TrueAuthWebViewController.swift84-92

The Quantum class is instantiated and used for:

  • Token-based initialization: quantum.initialize(token: configuration.atomicToken, view: webView, controller: self)
  • URL navigation: quantum.goto(url: configuration.url)
  • Resource cleanup: quantum.cleanup()

Sources: LinkSDK/TrueAuthWebViewController/TrueAuthWebViewController.swift47 LinkSDK/TrueAuthWebViewController/TrueAuthWebViewController.swift86-87 LinkSDK/TrueAuthWebViewController/TrueAuthWebViewController.swift111

Dependency Management

The LinkSDK uses Swift Package Manager (SPM) for dependency management, with different resolution mechanisms for different development contexts.

Package Resolution Files

The project maintains multiple Package.resolved files for different contexts:

File Location Purpose Git Repository Format
Package.resolved SPM distribution HTTPS URL
LinkSDK.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved Xcode development SSH URL

Both files resolve to the same commit hash and version:

{
  "revision": "e66d3b8e4bfc83c5074a5edde3ef2718d9406a11",
  "version": "3.17.0"
}

Sources: Package.resolved8-9 LinkSDK.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved9-10

Swift Package Manager Configuration

Target Configuration

defines

declares

depends on

from

Package.swift
Main Manifest

LinkSDK Target

QuantumIOS Product

quantum-ios Package

dependencies: [.product(name: QuantumIOS)]

linkerSettings: [.linkedFramework(QuantumIOS)]

Sources: Package.swift24-35

The target configuration specifies:

  • Product dependency: .product(name: "QuantumIOS", package: "quantum-ios")
  • Linker framework: .linkedFramework("QuantumIOS")

Sources: Package.swift28 Package.swift32

Platform and Version Requirements

The LinkSDK specifies minimum platform requirements that affect dependency resolution:

Requirement Value Impact
iOS Minimum Version iOS 13.0 Determines available APIs
Swift Tools Version 5.7 Language feature support
Default Localization en String resource handling

Sources: Package.swift1 Package.swift8 Package.swift10

Import and Usage Patterns

QuantumIOS is imported and used in authentication components:

import QuantumIOS
import SafariServices
import UIKit
@preconcurrency import WebKit

The framework integrates with standard iOS frameworks through:

  • Async initialization: Using Task and async/await patterns
  • WebKit integration: Providing WKWebView instances to Quantum
  • UIKit lifecycle: Managing view controller presentation

Sources: LinkSDK/TrueAuthWebViewController/TrueAuthWebViewController.swift8-11 LinkSDK/TrueAuthWebViewController/TrueAuthWebViewController.swift84-92