Skip to main content
Logo
Explore APIsContact Us
  • Home
  1. Resources
  2. Virtual Stadium
  3. Dependencies

Dependencies

This guide walks you through adding the Virtual Stadium iOS SDK to your project. The SDK is distributed through Swift Package Manager and includes both the Data SDK and UI SDK as integrated dependencies.


#Current Version

Latest Version

#Swift Package Manager Configuration

The Virtual Stadium SDK is hosted on GitHub and can be added to your project using Swift Package Manager (SPM). The UI SDK automatically includes the Data SDK as a dependency.

#Adding the Package

You can add the Virtual Stadium SDK to your project in two ways:

#Option 1: Xcode UI (Recommended)

  1. Open your project in Xcode
  2. Go to File → Add Package Dependencies...
  3. Enter the repository URL:
text
   https://github.com/sportradar/VirtualStadium-SDK-UI
  1. Select the version rule:
    • Up to Next Major Version (recommended for stability)
    • Or specify an exact version from the releases page
  2. Click Add Package
  3. Select the VirtualStadiumUISDK product to add to your target
  4. Click Add Package

#Option 2: Package.swift

If you're developing a Swift package, add the dependency to your Package.swift: Package.swift:

swift
// swift-tools-version: 5.9
import PackageDescription

let package = Package(
    name: "YourApp",
    dependencies: [
        // Virtual Stadium UI SDK
        .package(
            url: "https://github.com/sportradar/VirtualStadium-SDK-UI",
            from: "1.0.0"  // Replace with latest version
        )
    ],
    targets: [
        .target(
            name: "YourApp",
            dependencies: [
                .product(name: "VirtualStadiumUISDK", package: "VirtualStadium-SDK-UI")
            ]
        )
    ]
)
info

Replace "1.0.0" with the latest version from the releases page, or use .upToNextMajor(from: "1.0.0") for automatic minor and patch updates.


#Importing the SDK

After adding the package, import the SDK in your Swift files:

swift
import VirtualStadiumUISDK

#Minimum Requirements

The Virtual Stadium iOS SDK has the following minimum requirements:

RequirementVersion
iOS14.0 or higher
Swift5.9 or higher
SwiftUIiOS 14.0+ (native support)

#Project Configuration

Ensure your project meets these requirements: Project Settings:

swift
// In Xcode, verify:
// 1. General → Deployment Info → iOS Deployment Target: 14.0 or higher
// 2. Build Settings → Swift Language Version: Swift 5 or higher

For projects using Package.swift, ensure your platform requirement is set: Package.swift:

swift
let package = Package(
    name: "YourApp",
    platforms: [
        .iOS(.v14)  // iOS 14.0 minimum
    ],
    // ...
)

#Next Steps

Now that you've added the SDK dependencies, proceed to the Usage Guide to learn how to initialize and configure the Virtual Stadium SDK in your app.

Last updated about 1 month ago
Is this site helpful?
Virtual Stadium, Moderation, Engagement Tools
OverviewSDK Initialization
On this page
  • Current Version
  • Swift Package Manager Configuration
  • Adding the Package
  • Option 1: Xcode UI (Recommended)
  • Option 2: Package.swift
  • Importing the SDK
  • Minimum Requirements
  • Project Configuration
  • Next Steps