This repository and those adapters are now deprecated. They are not supported and will not be updated anymore.
The Smart Display SDK (7.14+) can be used with MoPub SDK through Custom Event Classes provided in this repository. Supported Ad Formats are Banners, Fullscreen, Rewarded Video and Native Ads.
-
Install the Smart Display SDK in your Xcode project. This can be done using Cocoapods (by installing the
Smart-Display-SDKpod) or by following the instructions in our documentation. -
Checkout this repository and copy the Custom Event Classes you need into your XCode Project.
SASMopubBannerCustomEventfor banner ads.SASMopubInterstitialCustomEventfor interstitial ads.SASMopubRewardedVideoCustomEventfor rewarded videos.SASMopubNativeAdAdapterandSASMopubNativeAdCustomEventfor native ads.SASMopubAdapterConfigurationinandSASMopubUtilsany cases.
- (Optional) If you plan to use Native Ads, don't forget to add
SASMopubNativeAdCustomEventas a supportedCustomEvent to yourMPNativeAdRendererConfigurationor its subclass.
let config = MPStaticNativeAdRenderer.rendererConfiguration(with: settings)!
config.supportedCustomEvents = [ "SASMopubNativeAdCustomEvent" ]
-
On your MoPub's dashboard, create a new Custom Native Network under the Networks tab, and fill your Ad Units with the relevant Custom Event Classes. For example for a banner Ad Unit, set
SASMopubBannerCustomEventas the Custom Event Class. -
Fill the Custom Event Class Data with the informations of your Smart AdServer's placements. You must use a valid JSON String and the 4 parameters : siteid, pageid, formatid and target must exist in this string. If you want to leave a parameter empty (target for instance) feel free to do it, as long as all keys exist.
{"siteid":"your-siteID","pageid":"your-pageID","formatid":"your-formatID","target":"your-target-or-empty"}
-
Make sure your new Custom Native Network is activated for your chosen Ad Units and Segments.
-
That's it, you're all set, you should be able to display Smart AdServer's ads through your MoPub SDK integration.
- Clicks counting : you may experience discrepancies between MoPub and Smart AdServer click statistics. This is due to the fact that MoPub can only count one click per ad whereas Smart AdServer is able to count multiple clicks on the same ad.
You can find more informations about the Smart Display SDK and the MoPub SDK Custom Events in the official documentation: http://documentation.smartadserver.com/displaySDK/