Sample Apps

Android Sample App

Install from Google Play or build from source code.

Install Build

iOS Sample App

Install Enterprise Distribution or build from source code

Install Build

Unity Sample App

Build from source code


The MoPub Sample App is for anyone who has a stake in how a creative or tag functions in a MoPub-integrated app:

  • Publishers and app developers: Use the MoPub Sample App as a reference implementation to troubleshoot possible MoPub-SDK integration issues.
  • Demand-side partners: Use the MoPub Sample App as a reference implementation for how all MoPub-integrated inventory will function, so that you can focus on developing the creative that works across various publishers’ apps.
  • Rich-media partners: Use the MoPub Sample App for rich-media certifications.

Use our sample app with the understanding that it will be used only for non-revenue-generating, internal testing purposes.

The MoPubSample app enables you to view and test various ad formats, including:

  • Banners
  • Medium Rectangles
  • Interstitials
  • Native static and video
  • Rewarded Video

You can now also save your own ad unit IDs for testing. Additionally, the sample app is now AndroidX compatible.

Setting Up An Ad Unit

The sample app comes with an example ad unit set up for each ad unit type, but you can also create your own ad units in the app for end-to-end testing. To set up an ad unit in the sample app:

1) Select “new ad unit”
2) Select the ad unit type from the drop down menu
3) Enter the ad unit ID from your MoPub account
4) Name the ad unit
5) Select “save ad unit”
6) The ad unit will now be listed under its corresponding ad unit type and is ready to use.

Sample App Mediation

The sample app now comes with network adapters fully integrated to allow for mediation testing. Please note that if you are building the sample app using iOS source code, you will need to run “pod update” from the Canary folder. For Unity, please use the SDK manager.

Not all adapter versions are up-to-date, but you can override the versions in the below folders:

Please note some networks need personal keys:

  • AppLovin needs an SDK Key in AndroidManifest and Info.plist
  • Google (AdMob & Ad Manager) needs an app ID in AndroidManisfest and Info.plist

GDPR Simulation

The Android sample app now allows for GDPR consent simulation. Select the menu bar in the upper left hand corner, and GDPR simulation options will be available under “privacy” (grant consent, revoke consent, etc.)

MoPub Manager

Native Ad Renderers

Publishers must register their own native ad renderers, including in the MoPub sample app. More info can be found here for Android and here for iOS.

Additionally, you can reorder the renderers on the iOS sample app. Network renderers should be registered first. To rearrange native renderers on iOS, swipe left to open the menu bar in the app, scroll down to “native renderer” and select “change order”.

MoPub Manager

Android Logs

The android sample app allows you to view impression logs in JSON format. In order to view impression logs, select the three button menu in the top right corner.

Select “clear logs” to clear out the logs, and select “impressions” to view the logs. Here you will find a list of JSON objects with impression log data for all impressions rendered on the sample app. Screenshot below with all fields available in the logs.

MoPub Manager