This guide will help you install and set up the Linkrunner SDK in your native iOS application.

Requirements

  • iOS 15.0 or higher
  • Swift 5.9 or higher
  • Xcode 14.0 or higher

Installation

Swift Package Manager

The Linkrunner SDK can be installed via Swift Package Manager (SPM), which is integrated directly into Xcode.

  1. In Xcode, select FileAdd Package Dependencies…
  2. Enter the following repository URL:
    https://github.com/linkrunner-labs/linkrunner-ios.git
  3. Select the version you want to use (we recommend using the latest version)
  4. Click Add Package

Alternatively, you can add the package dependency to your Package.swift file:

dependencies: [
    .package(url: "https://github.com/linkrunner-labs/linkrunner-ios.git", from: "1.0.0")
]

And add the dependency to your target:

targets: [
    .target(
        name: "YourApp",
        dependencies: [
            .product(name: "Linkrunner", package: "linkrunner-ios")
        ]
    )
]

Importing in Swift

After installation, you can import the SDK in your Swift files:

import Linkrunner

Required Permissions

App Tracking Transparency

If you plan to use IDFA (Identifier for Advertisers), you need to request permission from the user through App Tracking Transparency. Add the following to your Info.plist file:

<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads and improve your app experience.</string>

Network Access

The SDK requires network access to communicate with Linkrunner services. Make sure your app has the appropriate permissions for network access.

Next Steps

After installation, proceed to the Usage Guide to learn how to initialize and use the Linkrunner SDK in your iOS application.