iOS SDK Installation
Pre-requisites
- Xcode version 26.2 or newer. On Xcode 27 with CocoaPods, also see Xcode 27 below.
- Obtain client settings from Publift:
TENANT_CODETAG_IDGADApplicationIdentifier
Installation (Swift Package Manager)
- Open your Xcode project
- In Xcode, select the menu item “File > Add Package Dependencies…”
- On the “Add Packages” popup, enter the package URL “https://github.com/Publift/fuseapp-swift-package.git"
- Select “fuseapp-swift-package” and click the “Add Package” button
- On the “Choose Package Products” popup, select your app in the “Add To Target” column and tap the “Add Package” button
- In the main Xcode window left panel,
FuseAppSDKwill now be listed under “Package Dependencies”
Note: On Fuse App SDK 2.8.0 or older, also add -ObjC to “Other Linker Flags” in your app target’s “Build Settings”. Without it, Xcode leaves the GAM mediation adapters out of your app, and those ad networks receive no ad requests.
Note: If the Xcode “Issue Navigator” tab displays a build message “multiple potential binary artifacts found” for “DTBiOSSDK” or “FBAudienceNetwork”, these messages can be safely ignored.
Installation (CocoaPods)
- Install CocoaPods in your Xcode project
- Add the following lines to your
Podfile:
# Put these lines at the top of your Podfile.
platform :ios, '15.0'
source 'https://dl.cloudsmith.io/BrnMk9bbufLlX4Vd/publift/fuseapp/cocoapods/index.git'
source 'https://cdn.cocoapods.org/'
# Add the 'FuseAppSDK' package to your app.
target 'MyApp' do
use_frameworks!
pod 'FuseAppSDK'
end
For the platform configuration line, we require iOS 15.0 or newer.
# Xcode 27 requires iOS 15.0 or newer for every target, but some ad SDKs
# that Fuse App SDK depends on still declare a lower version.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |build_config|
if Gem::Version.new(build_config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] || '0') < Gem::Version.new('15.0')
build_config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
end
end
end
end
Without it, Xcode 27 fails with an error like this:
The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 12.0, but the range of
supported deployment target versions is 15.0 to 27.0.x. (in target 'Google-Mobile-Ads-SDK' from project 'Pods')
Google gives a similar instruction for the Google Mobile Ads SDK (Configure deployment target for Xcode 27); this hook only raises targets below 15.0, so it never lowers a pod that needs a newer iOS version. If your Podfile already has a post_install block, add the installer.pods_project.targets.each loop inside it; CocoaPods rejects a second post_install block. Swift Package Manager installations don’t need this.
- Run
pod install(orpod install --repo-updateif it fails)
Build Settings
In your Xcode project “Build Settings”, set the following configuration:
| Key | Value |
|---|---|
| User Script Sandboxing | No |
App Info.plist Settings
Add the following key/value pairs in the Info.plist file of your Xcode project:
| Key | Value |
|---|---|
| com.publift.mobile.TENANT_CODE | (Provided by Publift) |
| com.publift.mobile.TAG_ID | (Provided by Publift) |
| GADApplicationIdentifier | (Provided by Publift) |
| SKAdNetworkItems | Copy & add the contents from here. |
| App Uses Non-Exempt Encryption | NO |
Initialization
Add the following code to your UIApplicationDelegate:
import FuseAppSDK
...
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
...
FuseSDK.shared.initializeSDK()
return true
}
If your app is using a SwiftUI App struct, you can add a UIApplicationDelegateAdaptor to initialize the Fuse SDK:
import FuseAppSDK
@main
struct MyApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
...
}
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FuseSDK.shared.initializeSDK()
return true
}
}
initializeSDK() returns at once, starts the SDK in the background, and can be called from any thread. Ads created before it has finished wait for it, so you don’t need to wait before showing them.