This document describes the procedure for serving Start.io (Formerly StartApp) Ads in your iOS application using MoPub mediation network
- The code samples in this document can be copy/pasted into your source code
- If you have any questions, contact us via support@start.io
Step 1, Getting Started
The following instructions assume you are already familiar with the MoPub mediation network and have already integrated the MoPub iOS SDK into your application. Otherwise, please start by visiting MoPub site and reading the instructions on how to add MoPub mediation code into your app.
- MoPub site: mopub.com/resources/supported-mediation-partners
- MoPub instructions: https://developers.mopub.com/docs/ios
Step 2, Adding Your Application to Your Start.io Developer's Account
- Login into your Start.io (Formerly StartApp) developer's account
- Add your application and get its App ID
- Download the Start.io In-App SDK
For any questions or difficulties during this process, please contact us via support@start.io
Step 3, Integrating the MoPub Mediation Adapter
Add the required MoPub adapter classes from the zip file to your project: STAMoPubCustomEventBanner
STAMoPubCustomEventInterstitial
STAMoPubCustomEventNative
STAMoPubNativeAdAdapter
Make sure to check the "Copy items if needed" checkbox.
Step 4, Integrating Start.io In-App SDK
Integrate the Start.io (Formerly StartApp) SDK by implementing steps 1-3 from the integration manual. You can ignore all the following steps unless you want to use Start.io Ads directly instead of via MoPub mediation network.
In step 3 of the integration, call [sdk disableReturnAd]
after initializing your appID and devID:
sdk.devID = @"your account id";
sdk.appID = @"your app Id";
[sdk disableReturnAd]; // Add this line to disable return ads
This extra line will disable Start.io (Formerly StartApp) "Return Ads" feature as it's not an integral part of MoPub mediation. You can still enjoy this attractive ad unit directly by omitting this line. In this case Return Ads will be activated and display Start.io direct ads, outside of the MoPub Mediation network.
Step 5, Adding a Custom Event
- Login into your MoPub account
- Navigate to "Networks" tab and click "Add a Network"
3. Under "Additional Networks" click "Custom Native Network"
4. Under "Setup Custom Native Network", fill in "StartApp" in the "Title" field 5. Under "Set Up Your Inventory", select the Ad Units where you want to show Start.io (Formerly StartApp) ads, and fill in the appropriate class name under the "CUSTOM EVENT CLASS" box:
**Interstitial:** ``STAMoPubCustomEventInterstitial``
**Banner:** ``STAMoPubCustomEventBanner``
**Native:** ``STAMoPubCustomEventNative``
6. Optional, for Native only - you can get a specific ad size by filling it in the appropriate class data under "CUSTOM EVENT CLASS DATA" of your Native ad unit using the following format: ``` {"primaryImageSize" : primary_size, "secondaryImageSize" : secondary_size} ``` Where primary_size can get one of the following values: + 0 – for image size of 72x72 + 1 – for image size of 100x100 + 2 – for image size of 150x150 + 3 – for image size of 340x340 + 4 – for image size of 1200x628
the secondary_size can take the same values except the 1200x628 size.
For example: {"primaryImageSize":4, "secondaryImageSize":2} will return a primary image of 1200x628 and a secondary icon of 150x150.
7. Click "Save and Continue" 8. Click the "StartApp" network and make sure the "Run" button is active
Step 6, Testing Your Application
Congratulation - that's it! You may now run your app and see Start.io(Formerly StartApp) ads in action.