Getting started iOS
This guide helps you integrate the WSC SDK into your Swift project using CocoaPods, Swift Package Manager (SPM), and manually adding the framework. You'll also learn how to initialize the SDK with an API key using AppDelegate didFinishLaunchingWithOptions.
Version requirements
- iOS deployment target: iOS 15 or later
- Development environment:
- Xcode 15 or later
- Swift 5.1 or later
CocoaPods integration
CocoaPods is a dependency manager for Swift and Objective-C projects. To use CocoaPods to integrate the SDK, follow these steps:
- Install CocoaPods by running the following command in your terminal:
sudo gem install cocoapods - Navigate to your project's directory and create a Podfile by running:
pod init - Open the Podfile and add the SDK pod under the target section:
source 'https://github.com/WSCSports/blaze-specs-ios.git'
`target 'YourProjectName' do
use_frameworks!
pod 'BlazeSDK', '~> VersionNumber'
end`- Save and close the Podfile, then run the following command to install the SDK:
pod install - Open the generated .xcworkspace file in Xcode and continue with your development.
Swift package manager integration
Swift Package Manager (SPM) is a native dependency manager for Swift projects. To integrate the SDK using SPM:
- In Xcode, go to File > Add Packages....
- Enter the repository URL for the SDK and click Next.
- Select the version of the SDK you want to use and click Next. Recommended to select up to next major.
- For integrating ads - select the relevant ads targets in addition to the SDK.
- If no ads are required - you may unselect them from your target.
- If you already had the SDK but didn't have the ads packages and want to add them - you may "re-add" our package and select the new targets in addition.
- Confirm the package settings and click Finish to add the SDK to your project.
Manual framework integration
To manually add the framework to your project:
- Download the SDK framework file here and unzip it.
- Open your Xcode project.
- Drag and drop the downloaded framework file into your project's Frameworks, Libraries, and Embedded Content section, usually found under the General tab of your project's target settings.
Updated 4 months ago
Did this page help you?
