Get started with Prebid Mobile by creating a Prebid Server account.
Easily include the Prebid Mobile SDK for your primary ad server in your Podfile.
platform :ios, '11.0' target 'MyAmazingApp' do pod 'PrebidMobile' end
Build Prebid Mobile from source code. After cloning the repo, from the root directory run
to output the PrebidMobile.framework.
In order to conduct header bidding within your app you will need a Prebid Server hosted account. There are two options available for publishers:
The simplest option is to sign up for a hosted solution. Several Prebid.org members provide hosting packages.
Once you have a Prebid Server account, you will need to add your account credentials to the app.
Prebid.shared.prebidServerAccountId = @"YOUR_ACCOUNT_ID"; Prebid.shared.prebidServerHost = PrebidHostAppnexus;
If you have opted to host your own Prebid Server solution you will need to store the url to the server in your app.
Integrating MoPub with your application
After the registration you will be automatically prompted to set up a new MoPub application required for integrating mobile ads to your application.
Integrating Google with your application
Go to Google’s developer site and follow the instructions for integrating their Mobile Ads SDK into your app.
Targeting parameters enable you to define the target audience for the bid request. Prebid Mobile supports the following global targeting parameters. These targeting parameters are set only once and apply to all Prebid Mobile ad units. They do not change for a given user session.
View the full list of targeting parameters
Banner and interstitial ad units can be created:
let bannerUnit = BannerAdUnit(configId: "6ace8c7d-88c0-4623-8117-75bc3f0a2e45", size: CGSize(width: 300, height: 250))
For details on creating the specific ad units and additional parameters and methods associated with each view the documentation pertaining to them:
Once an ad unit has been instantiated, custom keywords can be added to it to improve its targeting.
bannerUnit.addKeyword(key:"Sample", value:"Value to add")
For more details on custom keywords, review the adUnit class documention