Get Started

Integrating Native Third-Party Ad Networks – iOS


We offer a ‘plug-and-play’ solution for Facebook.

To set the integration up, follow these instructions.

Note: these instructions assume you have already successfully integrated the MoPub SDK using one of the .zip archives.

1. Clone the `mopub-ios-sdk` repo.
Go into your terminal and type `git clone https://github.com/mopub/mopub-ios-sdk.git`

2. Add the following files (located in the repo you just cloned):
For Facebook Audience Network:
`AdNetworkSupport/Facebook/FacebookNativeCustomEvent.h`
`AdNetworkSupport/Facebook/FacebookNativeCustomEvent.m`
`AdNetworkSupport/Facebook/FacebookNativeAdAdapter.h`
`AdNetworkSupport/Facebook/FacebookNativeAdAdapter.m`

to your Xcode project.
IMPORTANT if you are using Manual Reference Counting you’ll need to set the `-fobjc-arc` compiler flag on these files.

3. Download the MoPub supported version of each ad network SDK and import it using the ad networks’ instructions. You can find the Supported Version list on our Supported Networks Page.

Facebook Integration

  • Setup mediation on app.mopub.com for Facebook.
  • You can find the Supported Version list on our Supported Networks Page.
  • Your app should now be able to present third party network native advertisements.

Updated September 2016