Skip to main content

Setup

What's included

This guide explains the supported toolchain and every way to add the iOS SDK to your app.

  • Requirements
  • Configure JFrog credentials (.netrc) for all download paths
  • Add the SDK with Swift Package Manager (recommended)
  • Link frameworks manually (Debug and Release xcframeworks)
  • Link frameworks through CocoaPods (alternative)

Requirements

Use the following minimum and recommended versions in your app project.

  • Xcode 14.0+
  • Swift 5.1+
  • Minimum deployment target: iOS 14.0+ (tvOS 14.0+ for tvOS apps)

Configure JFrog credentials for all download paths

Set up JFrog credentials first. Manual downloads, Swift Package Manager, and CocoaPods all require access to firstlight.jfrog.io.

  1. Create a .netrc file in your home directory.
  2. Add your JFrog credentials. Use your API key or access token as the password.
    machine firstlight.jfrog.io
    login <USERNAME>
    password <PASSWORD>
  3. Set secure file permissions:
    chmod 600 ~/.netrc

Add dependencies with Swift Package Manager

Use Swift Package Manager as the primary integration path for app dependencies.

  1. In Xcode, go to File > Add Package Dependencies....
  2. Enter the iOS SDK SPM manifest repository URL: https://github.com/fl-client/ios-sdk-spm.git
  3. Select the required version rule for your release process (for example, Up to Next Major Version).
  4. Add the required products to your app target:
    • FLFoundation
    • FLPlayerInterface
    • FLPlatformCore
    • FLContentAuthorizer
    • FLPlayer
    • FLPlatformPlayer

The SPM repository contains Package.swift, while module artifacts (.xcframework.zip) are downloaded from JFrog. Keep your .netrc credentials configured.

Framework linking (manual)

Use this path when your app requires direct framework integration instead of a package manager.

Manual dependency

The libraries are distributed as xcframework and must be embedded and signed with the client app.

Use the following links to download frameworks manually:

Release frameworks: https://firstlight.jfrog.io/artifactory/fl-ios-sdk-local

Debug frameworks: https://firstlight.jfrog.io/artifactory/fl-ios-sdk-debug-local

Build settings

For Xcode 14.0 and later, the libraries are archived with bitcode disabled for iOS and enabled for tvOS. Add the build setting ENABLE_BITCODE=NO for iOS targets in your client app.

Through CocoaPods (alternative)

Use this path only if your app cannot adopt Swift Package Manager yet.

Prerequisites

Complete these steps before installing the library:

  1. Install the cocoapods-art plugin:

    gem install cocoapods-art
  2. Add an Artifactory repository to your local machine:

    pod repo-art add fl-ios-sdk-local "https://firstlight.jfrog.io/artifactory/api/pods/fl-ios-sdk-local"
  3. Add the following snippet to the top of your Podfile:

    plugin 'cocoapods-art', :sources => [
    'fl-ios-sdk-local'
    ]

    pod 'Firstlight/FLFoundation'
    pod 'Firstlight/FLPlayerInterface'
    pod 'Firstlight/FLPlatformCore'
    pod 'Firstlight/FLContentAuthorizer'
    pod 'Firstlight/FLPlayer'
    pod 'Firstlight/FLPlatformPlayer'

Resolve dependencies

Run the following command to install dependencies:

pod install

Synchronize the cocoapods-art plugin's repositories with Artifactory

The cocoapods-art plugin doesn't automatically update its index when you run client commands such as pod install. To keep your plugin's index synchronized with your CocoaPods repository, run the following command:

pod repo-art update fl-ios-sdk-local

You can consume the latest library version only after updating the index.

Additional dependencies (as required)

Include the following dependencies in your Podfile as required for your customized solution.

  1. Yospace SSAI player
pod 'Firstlight/FLAdvertisingYospace'
  1. GoogleIMA CSAI/SSAI player
pod 'Firstlight/FLAdvertisingGoogleIMA'
  1. Bookmark integration
pod 'Firstlight/FLBookmarks'
  1. Heartbeat integration
pod 'Firstlight/FLHeartbeat'
  1. StreamConcurrency integration
pod 'Firstlight/FLStreamConcurrency'
  1. Favorites integration
pod 'Firstlight/FLFavorites'
  1. AdvertisingGooglePAL
pod 'Firstlight/FLAdvertisingGooglePAL' 
  1. Analytics integration
pod 'Firstlight/FLAnalytics'
  1. StreamTimeline integration
pod 'Firstlight/FLStreamTimeline'

Add dependencies to debug the framework

To debug the framework, complete the following steps:

  1. Add an Artifactory repository to your local machine:

    pod repo-art add fl-ios-sdk-debug-local "https://firstlight.jfrog.io/artifactory/api/pods/fl-ios-sdk-debug-local"
  2. Add the following snippet to the top of your Podfile:

    plugin 'cocoapods-art', :sources => [
    'fl-ios-sdk-debug-local'
    ]

    pod 'Firstlight_debug/FLFoundation'
    pod 'Firstlight_debug/FLPlayerInterface'
    pod 'Firstlight_debug/FLPlatformCore'
    pod 'Firstlight_debug/FLContentAuthorizer'
    pod 'Firstlight_debug/FLPlayer'
    pod 'Firstlight_debug/FLPlatformPlayer'

You can add additional dependencies to the Podfile in the same way.