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 (
DebugandReleasexcframeworks) - 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.
- Create a
.netrcfile in your home directory. - Add your JFrog credentials. Use your API key or access token as the
password.
machine firstlight.jfrog.io
login <USERNAME>
password <PASSWORD> - 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.
- In Xcode, go to File > Add Package Dependencies....
- Enter the iOS SDK SPM manifest repository URL:
https://github.com/fl-client/ios-sdk-spm.git - Select the required version rule for your release process (for example, Up to Next Major Version).
- Add the required products to your app target:
FLFoundationFLPlayerInterfaceFLPlatformCoreFLContentAuthorizerFLPlayerFLPlatformPlayer
The SPM repository contains
Package.swift, while module artifacts (.xcframework.zip) are downloaded from JFrog. Keep your.netrccredentials 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:
-
Install the cocoapods-art plugin:
gem install cocoapods-art -
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" -
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.
- Yospace SSAI player
pod 'Firstlight/FLAdvertisingYospace'
- GoogleIMA CSAI/SSAI player
pod 'Firstlight/FLAdvertisingGoogleIMA'
- Bookmark integration
pod 'Firstlight/FLBookmarks'
- Heartbeat integration
pod 'Firstlight/FLHeartbeat'
- StreamConcurrency integration
pod 'Firstlight/FLStreamConcurrency'
- Favorites integration
pod 'Firstlight/FLFavorites'
- AdvertisingGooglePAL
pod 'Firstlight/FLAdvertisingGooglePAL'
- Analytics integration
pod 'Firstlight/FLAnalytics'
- StreamTimeline integration
pod 'Firstlight/FLStreamTimeline'
Add dependencies to debug the framework
To debug the framework, complete the following steps:
-
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" -
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.