Add the Audience Network SDK to your iOS App
Updated: Jun 30, 2026
Copy for LLM
This guide explains how to include the Audience Network SDK in your iOS app so that you can call Audience Network
APIs. The recommended method is to use the
Swift Package Manager to manage the dependency; you can also use
CocoaPods or download the SDK for manual integration.
You may also refer to our mediation partner’s documentation websites:
- AppLovin iOS instructions
- Google AdMob iOS instructions
- Google Ad Manager iOS instructions
- Unity instructions
Swift Package Manager (recommended)
The Swift Package Manager is a tool for automating the distribution of Swift
code and is integrated into the Xcode build system. Starting with version 6.22.0, the Audience Network SDK has full
Swift Package Manager support.
Add the package in Xcode
- Open your project in Xcode.
- Go to File > Add Package Dependencies...
- Enter the package repository URL:
https://github.com/facebook/FBAudienceNetwork - Select the version rule (for example, Up to Next Major Version from
6.22.0). - Click Add Package.
- Select the
FBAudienceNetworklibrary and add it to your target.
Add the package in Package.swift
If you manage dependencies through a
Package.swift manifest, add the Audience Network SDK to the dependencies
array and link the FBAudienceNetwork product to your target.dependencies: [
.package(url: "https://github.com/facebook/FBAudienceNetwork", .upToNextMajor(from: "6.22.0"))
],
targets: [
.target(
name: "YourTarget",
dependencies: [
.product(name: "FBAudienceNetwork", package: "FBAudienceNetwork")
]
)
]
CocoaPods
Audience Network SDK 6.22.0 is the last version distributed through CocoaPods. Future releases will be available
only through the Swift Package Manager or a direct download.
Add the following line to your project’s Podfile.
pod 'FBAudienceNetwork'
Run the following command.
pod install
Manual download
If using CocoaPods is not an option, you can download the Audience Network SDK from one of the locations in the
following table.
| Package | Date | Change Log |
|---|---|---|
July 27, 2026 | ||
February 19, 2026 | ||
October 24, 2025 |
After you download the Audience Network SDK, complete the integration as follows:
- Open your project in Xcode.
-
Drag & drop FBAudienceNetwork.xcframework from the Dynamic folder in your downloaded iOS
Audience Network SDK archive into Xcode.

-
In the General tab in your application target settings select Embed & Sign for
FBAudienceNetwork.xcframework

Notes
- The static variant of the Audience Network SDK is deprecated as of 6.22.0. We recommend using the dynamic framework, which is configured automatically when you integrate through the Swift Package Manager or CocoaPods.
- You can also use static variant of Audience Network SDK provided in the download. To do this, drag and drop FBAudienceNetwork.xcframework from the Static folder
- If you want to use the Static variant, make sure your project is using Swift. If your project doesn’t use Swift, add an empty swift file (File -> New -> Swift in Xcode) to your project
- If your project is targeting iOS version earlier than 12.4, make sure to set the Always embed Swift standard libraries setting to YES, under the Build settings of your application’s target in Xcode.
- To avoid adding any extra tweaks after manual installation, use the Swift Package Manager.
Troubleshooting for SDK versions 6.9.0 and higher
Starting from 6.9.0, iOS Audience Network SDK has Swift enabled. Refer to points below in order to work through the
most common problems of SDK installation & Swift interoperability:
- Xcode emits errors: ‘Undefined symbol:
__swift_FORCE_LOAD_$_swiftDataDetection’ and ‘Undefined symbol:__swift_FORCE_LOAD_$_swiftFileProvider. These errors mean that you are using not the latest version of Xcode. Update to Xcode 13 or newer to fix this errors. - Xcode emits many errors
Undefined symbol__swift_FORCE_LOAD_$_. These errors mean that you don’t have Swift support enabled for your project. The simplest way to fix this is to add an empty Swift file (‘File’ -> ‘New’ -> ‘Swift file’ in Xcode). - When running on device, application crashes right after start with an error: ‘dyld: Library not loaded: @rpath/FBAudienceNetwork.framework’. This error means that you didn’t embed Audience Network SDK in your app. Please go to your target settings and choose ‘Embed & Sign’ for ‘FBAudienceNetwork.xcframework’ on ‘General’ tab.
- Application crashes right after start with an error: ‘dyld: Library not loaded: @rpath/libswiftCore.dylib’. This error means that you are running an app on iOS older than 12.4 and did not set ‘YES’ for “Always embed Swift standard libraries” setting. Please make sure to set “Always embed Swift standard libraries” setting to YES under “Build settings” of your application’s target in Xcode.