Fyber

If you plan to use the MoPub SDK to load and display ads from Fyber via mediation, use this article for integration instructions and information unique to the ad network. To learn more about how MoPub mediation works, refer to our MoPub Network Mediation article.

Supported Ad Formats

Fyber currently supports the following ad formats. For support information, visit the Fyber homepage.

MoPub Formats Fyber Ad Formats
Banner Banner Ad
Medium Rectangle Medium Rectangle
Interstitial Interstitial
Rewarded Ad Rewarded Video

Download and Integrate

To download the Fyber adapters, navigate to the Mediation Integration Tool.

For the latest download and integration instructions, consult Fyber’s tutorials (iOS, Android before you integrate the SDK and adapters.

  • For Android, all Fyber adapters are released as an Android Archive (AAR) file. The AAR includes the required Manifest data for Fyber. For optional permissions Fyber recommends, please see the Additional Configurations topic here.

Set Up Fyber on the MoPub Dashboard

  • app ID and spot ID information are required.

Initialization

Fyber requires your appID information to successfully initialize. Fyber requires initialization in order to serve ads. To initialize, follow these steps:

Initialize on iOS

// Declare your Fyber app ID and config bundle
NSMutableDictionary *fyberConfigs = [NSMutableDictionary new];
[fyberConfigs setObject:@"YOUR_FYBER_APP_ID" forKey:@"appID"];

MPMoPubConfiguration *sdkConfig = [[MPMoPubConfiguration alloc] initWithAdUnitIdForAppInitialization:@"AD_UNIT_ID"];

sdkConfig.additionalNetworks = @[FyberAdapterConfiguration.class];
sdkConfig.mediatedNetworkConfigurations = [@{@"FyberAdapterConfiguration":fyberConfigs} mutableCopy];

// Initialize the MoPub SDK
[[MoPub sharedInstance] initializeSdkWithConfiguration:sdkConfig completion:^{
}];
// Your MoPub SDK initialization code
let sdkConfig = MPMoPubConfiguration(adUnitIdForAppInitialization: YOUR_MOPUB_AD_UNIT_ID)
sdkConfig.additionalNetworks = [FyberAdapterConfiguration.self]
sdkConfig.mediatedNetworkConfigurations = [String(describing: FyberAdapterConfiguration.self):["appID": "YOUR_FYBER_APP_ID"]]

Initialize on Android

import com.mopub.mobileads.FyberAdapterConfiguration;

// Declare your Fyber app ID and config bundle
final Map<String, String> fyberConfigs = new HashMap<>();
fyberConfigs.put("appID", "YOUR_FYBER_APP_ID");

final SdkConfiguration.Builder configBuilder = new SdkConfiguration.Builder("A_VALID_AD_UNIT_ID_FROM_YOUR_APP");

configBuilder.withAdditionalNetwork(FyberAdapterConfiguration.class.getName());
configBuilder.withMediatedNetworkConfiguration(FyberAdapterConfiguration.class.getName(), fyberConfigs);

// Initialize the MoPub SDK
MoPub.initializeSdk(this, configBuilder.build(), null);

Initialize on Unity

Option 1. Use the MoPub Manager

Attach the Fyber Network Configuration script to your MoPub Manager Prefab, enable the script, and populate the appID information. Refer to the Network Configuration (Mediation) topic for an example.

Option 2. Initialize Manually

MoPub.InitializeSdk(new MoPub.SdkConfiguration {
  // Define the Fyber app ID you want to initialize with
  MediatedNetworks = new MoPub.MediatedNetwork[]
  {
    new MoPub.MediatedNetwork
    {
      // Specify the class name that implements the AdapterConfiguration interface.
      #if UNITY_ANDROID
        AdapterConfigurationClassName = "com.mopub.mobileads.FyberAdapterConfiguration",
      #else // UNITY_IOS
        AdapterConfigurationClassName = "FyberAdapterConfiguration",
      #endif

      NetworkConfiguration = new Dictionary<string, string> {
          { "appID", "YOUR_FYBER_APP_ID"},
      },
    }
  },
});

Test an Ad

We recommend that you test your Fyber integration using MoPub mediation test mode to verify that the adapter works as expected. Test mode must be set up on both the MoPub side and the Fyber side.

Set Up Test Mode on the MoPub Side

Refer to our Mediation Test Mode article for complete details on using this mode.

Additional Support

For inquiries and support, please contact your Fyber account manager.


Last updated August 10, 2021

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2021 MoPub (a division of Twitter, Inc.)