The AmpFreewheel plugin offers a quick way to integrate AmpPlayer with the Freewheel SDK. This plugin will handle the interaction between the AmpPlayer with the plugin as well as the ads insertion.

If you desire to check out a basic implementation please refer to our application samples:

Adding the Plugin to the Xcode project

Manual Installation

To manually install the plugin you’ll need to download our latest distribution. You’ll have to look for the AmpFreewheel.framework and the AmpCore.framework, for tvOS look instead for the AmpCoreTV.framework and the AmpFreewheelTV.framework.

The latest version of the AdManager SDK used by this plugin is 6.29.0 on iOS and 6.29.0 on tvOS . Newer versions may be used, but you may run into unexpected errors until an update is released.

After aquiring the frameworks you can just drag them to you Xcode project directory.

manual installation 1

The last step, is to mark every imported framework for Embed & Sign in the project’s general tab.

manual installation 2


If you don’t have CocoaPods installed, refer to the CocoaPods documentation. To use CocoaPods, first create a Podfile in the directory containing the Xcode project. For the AmpFreewheel plugin, the Podfile should look like this:

target "ProjectName" do


  pod 'AmpCore'
  pod 'AmpFreewheel'


Once you have added the Podfile just run the command pod install --repo-update in the directory it’s located. Once the command has been completed you should se a new .xcworkspace file in your folder. Now you can start integrating the library.


You need a working implementation of the AmpPlayer before using this plugin. If you need the implementation guide for AmpPlayer please refer to our documentation.


The first step is to import the AmpFreewheel plugin. In the most likely scenario you will need the AmpCore library.

import AmpCore
import AmpFreewheel

Creating a new instance

To use this plugin you should first initialize it. You need to specify the player being used as well as the Network ID for the ads. This should be provided by FreeWheel.

let freewheel = AmpFreewheel(ampPlayer: player, networkId: 42015)
While initializing the plugin will set the autoplay to false. You could expect unwanted behaviours if set to true.

Requesting Ads

To request ads for your videos just use this method with all the information provided by Freewheel.

freewheel.requestAds(serverUrl: "", profile: "42015:ios_allinone_profile", siteSectionId: "ios_allinone_demo_site_section", videoAssetId: VideoAssetId(id: "ios_allinone_demo_video", duration: 500))
You can also add the config block while calling this method where you’ll have access to the FWAdController for an extra layer of configuration before the ads are requested.

Integrating TrueX

To integrate Infillion’s TrueX ads with Freewheel you can follow their official guide. To integrate using Swift the other changes you must take into consideration are the following:

  1. Import the required headers with the help of the Bridging header file.

    #import <Foundation/NSString.h>
    #import <AdManager/FWSDK.h>
    #import <FWTXRenderer/FWTXRenderer.h>
    #import <FWTXRenderer/FWTXExtension.h>
    #import <FWTXRenderer/FWTXConstants.h>
    #import <FWTXRenderer/FWTXAdView.h>
  2. The linking on the AppDelegate while using swift is:

  3. Load the extension on the configuration closure of the ad requesting method

    ampFreewheel.requestAds(serverUrl: "",
                            profile: "42015:ios_allinone_profile",
                            siteSectionId: "ios_allinone_demo_site_section",
                            videoAssetId: VideoAssetId(id: "ios_allinone_demo_video",duration: 500)){
                				adController in
                				adController.adContext?.loadExtension(String(describing: FWTXExtension.self))

Additional Information

This guide was written on 4/28/2020 and it’s last revision was made on 9/28/2023. If you need any additional support please contact us through our offical support email.