Skip to main content
Skip table of contents

Adverts with Google IMA

To test this feature and view the example code, please see the Apple (FPS) SDK 5 Example Code Quick Start guide.

You can extend the CONNECT Player SDK for FPS to support the insertion of linear adverts using the third-party component IMAWrapper for the Google Interactive Media Ads (IMA) framework.

Adverts are only supported on iOS (Google do not provide an IMA framework for tvOS).

Prerequisites

An advert server already configured, and knowledge of the advert tag URLs used to access it.

An understanding of the CocoaPods technology, see Using CocoaPods.

Procedure

The process is split into two stages:

  • Installing IMA CocoaPods

  • Enabling playback of linear adverts

Installing the IMA CocoaPods pod

To carry out a pod integration from scratch, begin at step 1. If you are using the dynamic-ads-ima example application, start at step 3 as the pod file is already present.

  1. Install cocoapods by running the following command.

    BASH
    sudo gem install cocoapods
  2. Create your app’s podfile in the project root folder by running pod init and add the IMA pod dependency, which should look something like this.

    BASH
    target '<target_name>' do
        use_frameworks!
        source 'https://github.com/CocoaPods/Specs.git'
        platform :ios, '9.0'
        pod 'GoogleAds-IMA-iOS-SDK', '~> 3.9'
        end
  3. To apply this to your project, execute the following command in the project’s root folder (where the Xcode project file is located).

    BASH
    pod install  --repo-update

    The --repo-update switch is only required if you need the pod details to be reflected into the corresponding project workspace files, for example, the first time it is run.

There will now be a .xcworkspace configured with the IMA Pod linking capability; use this instead of the.xcodeproj.

Linear adverts

To enable playback of linear adverts, see Playback of linear adverts.

Companion adverts

To add companion ads, see the Google Developer's Guide.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.