Integrating the iOS SDK

Integrating with Cocoapods

Follow these steps to integrate via Cocoapods:

  1. Open a terminal.
  2. Navigate to your project folder.
  3. Create an empty pod file:
touch 'Podfile'
  1. Edit the pod file:
nano Podfile
  1. Add the following lines and substitute the <YOUR TARGET> with the real one:
target '' do
  pod 'Fyber_Marketplace_SDK'
  1. Save and exit using Ctrl+O -> Enter -> Ctrl+X
  2. Run install:
pod install
  1. After the pods have been installed, the ongoing work with Xcode should happen via its workspace file and not project file.

  2. Import the IASDKCore into the AppDelegate class:


#import <IASDKCore/IASDKCore.h>


If you get the response The target ... overrides the OTHER_LDFLAGS build setting defined in ...

  • Add the $(inherited) flag to the Other Linker Flags .

In case of Unable to find a specification for...

  • Run pod update, to update the locally cached pods and link everything in the Xcode workspace.

Downloading the SDK

To download the Marketplace iOS SDK, click here:

iOS Download Button


The Fyber Marketplace SDK Zip folder contains a test app that publishers can use for reference on how to integrate the SDK, how ads from Marketplace appear or to troubleshoot issues.

Starting the Process


From Fyber Marketplace SDK Version 7.8.3 VPAID is deprecated.


  • If you are using the Cocoapods Dependency Manager, click here, afterwards you can immediately skip to Step 2.
  • The Fyber iOS SDK requires, at minimum, an iOS 10.0 target and is fully compliant with iOS 15. 

Unity Wrapper

In addition to the native Android and iOS SDKs, the Marketplace SDK supplies a unity wrapping package, which can be used to import the Marketplace SDKs into a Unity project.

The Marketplace Unity wrapper package is built upon the Google Unity jar Resolver. It works by adding the native Android/iOS dependencies to the exported native projects made at Unity run time.

To use the Unity Wrapper, download the relevant unitypackage file and import it into your project.

Unity Download Button


Currently, the Marketplace Unity package does not provide any Unity bridging for requesting ads using Unity APIs.

Step 1: Integrating the Modules

  1. Drag the IASDKCore module to your project.


  1. Xcode displays a popup, asking for more details about what to do with the dropped folder.

Make sure that the Copy items if needed and Create Groups is selected in your application's target in the Add to targets section.


  1. Verify the linkage of the app target with the IASDKCore Module by clicking your application target -> Build Phases -> Link Binary With Libraries.
  2. If missing, drag the IASDKCore framework to the Link Binary With Libraries section.

This links your project with IASDKCore module and adds a required path to the Framework Search Paths.

  1. Find the Resources Bundle located inside IASDKCore.xcframework
  2. Add the Resources Bundle into 'Copy Bundle Resources' section:
  • Return to the Build Phases section
  • Click and expand the Copy Bundle Resources section
  • Drag the IASDKResources.bundle there.


  1. Add the libxml2.2.tbd lib to the target by clicking the application target -> Build Phases -> Link Binary With Libraries.

Once there, enter libxml2.2tbd, and click Add.

  1. Declare the -ObjC flag in the project by going to the application target -> Build Settings -> Other Linker Flags.

Once there, click add new (+), and enter -ObjC.

  1. Click Enter.


If your IASDK folders are physically located outside of your Xcode Project and were not copied at integration, you must provide a Framework Search Path. To do this, select your application target >> Build Settings >> Framework Search Paths.

Click add new (+), and type in the location of the IASDK Modules on your local workspace (e.g: ~/Downloads/IASDK-Publishers). Once complete, click Enter to define it as recursive, and close the window.

  1. Import the IASDK into the AppDelegate class:

Importing the IASDK

#import <IASDKCore/IASDKCore.h>

Step 2: Intitializing the SDK

Add the the following line of code inside the method of the AppDelegate class:


Initializing the SDK

[IASDKCore.sharedInstance initWithAppID:@"YOUR APP ID"
                        completionBlock:^(BOOL success, NSError * _Nullable error) {}

For details of advanced SDK init integration, click here.

Locating your Spot ID App ID

Make sure you enter the correct credentials. Follow the instructions below to find your Spot ID and App ID:

From the Inventory window, select the app for which you want to locate the ID.

The Spot ID is located in brackets, next to the spot name.  Click on it to save the ID to the clipboard.


To locate the App ID, click the three horizontal dots at the end of the row and then click Integration Options:


The Info window opens and your App ID and SDK information is displayed:


Step 3: Apple Requirements

There are some additional Apple Requirements.  Click here to review the requirements.

Configuring Tracking Permission Alerts With ATT Framework for iOS 14+

The AppTrackingTransparency (ATT) framework works by presenting an app-tracking authorization request to the user. The tracking authorization status is then returned based on the user's selection.

According to Apple, apps must use the AppTrackingTransparency framework if they collect data about end-users and share this with other companies for purposes of tracking across apps and websites.

Fyber uses the ATT framework, in iOS 14 and above, to retrieve users' authorization statuses.  For more information about ATT, click here

SKAdNetwork Attribution Solution

Apple created the SKAdNetwork API for advertisers to measure app installs in a privacy-aware manner in iOS 14 and above. Configuring SKAdNetwork IDs is a crucial aspect of monetizing with Fyber Marketplace since it allows our DSPs to credit your app with installs. It is highly encouraged that all of Fyber's recommended SKAdNetwork IDs are added to your info.plist to maximize your revenue potential.

To configure your app with SKAdNetwork IDs,

  1. Select  Info .plist  in the Project navigator in Xcode.

  2. Click the Add button (+) beside a key in the property list editor and press Return.

  3. Type the key name SKAdNetworkItems.

  4. Choose Array from the pop-up menu in the Type column.

  5. Create an array that contains one dictionary for each of Fyber's recommended SKAdNetwork IDs using the single key  SKAd Network Identifier . The string value for the key is the ad network identifier.
  6. To discover the SDAdNetwork IDs, you can also use Fyber’s SKAdNetwork IDs Manager. This tool processes and deduplicates SKAdNetwork IDs for all buyers on Fyber Marketplace, and then generates a finalized Info.plist output for you, for easy integration into your app. The tool also lets you add any other SKAdNetwork IDs you have to your final Info.plist


You must use lowercase for the ad network identifier string.

For more information, refer to the Apple specification for configuring SKAdNetwork IDs.

SKAdNetwork IDs

The SKAdNetwork IDs for both Fyber and Fyber buyers are available in two formats. These files are regularly updated.  The most up-to-date SKAdNetwork IDs can be found here:

Step 4: Adding Delegates

Depending on your integration, you must add delegate information to your iOS integration at this point.

Different delegates are required. Have a look below and select the necessary delegates.

Click here for details of: 

  • Global Ad Delegate Protocol
  • Unit Delegate
  • Video Content Delegate
  • HTML / MRAID Delegate

Initializing the App

Initialization is an expensive operation. We recommend performing it at the initialization stage of the app.

The previous SDK had no requirement to explicitly initiate it (as opposed to the Android version SDK). It initialized itself dynamically (lazy loading) on the first code request to the SDK itself.

We defined the initialize process as mandatory because the Fyber SDK relies on the Revenue Console configuration. Without this configuration, no ad unit is shown and the SDK will not work.

The following takes place during the initialization phase:

  • Initialization of all installed modules
  • Local configuration load process (in case it is not a first runtime)
  • Remote configuration fetching, parsing, loading and local configuration update.


All Publisher (client side) Ad Requests are on hold until the configuration is loaded to memory. The requests resume asynchronously once the config is ready. If a timeout occurs, the Publisher receives an ad failed event.

Step 5: Adding User Consent


Review the below GDPR related instructions (available starting iOS v7.0.8 SDK and legacy version v6.4.6) 


The General Data Protection Regulation of the European Union requires you to scope your user's consent. A user could be within the GDPR scope for your app when one or all of the following apply:

  • The user is currently located in the EU
  • The user has registered with the app as an EU resident
  • The app is specifically targeted to EU users


When you set a GDPR consent value for a user, Fyber concludes that you have decided that the user is subject to GDPR rules, even if the user is outside Europe. If, based on your legal position, your non-EU users are not subject to GDPR, do not pass any consent value for them.

We recommend you consult with a legal advisor to determine the best approach for your business. It is also highly recommended to collect user consent with a certified Consent Management Platform (CMP).

For a full list of CMPs, click here.

Once you have collected the user’s consent, you can pass it into the SDK using the following API of setGDPRConsent:, e.g:

[IASDKCore.sharedInstance setGDPRConsent:YES]

GDPRConsent is a boolean. It is true if you have the user’s consent. If you do not have the user's consent, it is false.

GDPRConsentString is a string.

It is highly recommended to use the 2nd option of passing a consent string per the IAB's Transparent & Consent Framework by using a valid CMP (Consent Management Platform). This is the most common form of consent communication worldwide and is crucial in order to enjoy ad monetization in the EU. Using the boolean option is inferior and will eventually be deprecated during 2020.

We recommend that the first time you gather the user’s consent, you pass it onto the SDK before starting the SDK. The SDK then takes the user’s consent into consideration when initializing. In the following sessions, you need only call the API if the user updates their consent.

Setting Consent String

To set the GDPR Consent String, use the: setGDPRConsentString:
The consent string is passed as is.


[IASDKCore.sharedInstance setGDPRConsentString:@""];

More information on GDPR can be found under the GDPR Resource Page and FAQs.


The intention of the California Consumer Privacy Act of 2018 (CCPA) is to protect the personal information of California residents. CCPA applies to all companies doing business in California. If a California resident uses an app developer’s mobile app, CCPA applies to the developer and every company that processes the personal information of the app’s users.
CCPA came into effect on 1 January 2020.

For more information on Fyber and CCPA, refer to Fyber’s Resource Page.
For more information about CCPA, refer to the IAB CCPA Compliance Framework.


Once you have the CCPA string, you can pass it to the SDK using the following API:


`IASDKCore.sharedInstance.CCPAString = `


IASDKCore.sharedInstance.CCPAString = @"1YNN";

To determine what value to use for the US Privacy String, refer to the IAB document here.
Example values:

  • When CCPA does not apply (for example if the user is not a resident of California) you can either skip this API or use the following value 1---
  • If the user choses NOT to opt out, and is ok with advertising as usual, you can use 1YNN
  • If the user chooses to restrict advertising and opt out, you can use 1YYN

To clear the CCPA provided data, just pass a nil.

Clear Privacy Setting

IASDKCore.sharedInstance.CCPAString = nil;



The Marketplace SDK does not validate the provided CCPA string and passes it, as is.

Step 6: Setting a User ID (Optional)

Follow these steps for setting a User ID.

Setting a User ID

We have added an API for setting a User ID.

There is no need to pass it on every session as we cache it on the device.


The User ID is sent, as is. There is no validation/modification.

To reset it from a device, pass a nil or an empty string.  The User ID is sent as is, without any validation or modification. 

@property (atomic, nullable) NSString *userID;


IASDKCore.sharedInstance.userID = @"User_123456";

Introspection (reflection) integration

Class IASDKCore = NSClassFromString(@"IASDKCore");
SEL sharedInstanceSelector = NSSelectorFromString(@"sharedInstance");
SEL setUserID = NSSelectorFromString(@"setUserID:");
id sharedInstance = [IASDKCore performSelector:sharedInstanceSelector];

[sharedInstance performSelector:setUserID withObject:@"User_123456"];


For details on integrating iOS ad formats, click here.

Back to Top ⇧