SDK - Native
Quick Start
Prerequisite: Complete the SDK Installation first. Minimum iOS deployment target: 14. Minimum SDK version required: 1.2.1.
Native Campaigns lets you display a scrollable list of campaigns directly in your app's UI. The SDK provides a default layout — you just drop it in and call load().

1. Set the Ad Unit ID
After configure, set the ad unit ID for native campaigns:
Get your Ad unit ID from the Developer Portal.
2. Add the View to Your Screen
MCNativeAdView is a plain UIView — add it anywhere you can add a subview.
Wrap MCNativeAdView with UIViewRepresentable:
Then use it in your view:
That's it. The SDK handles everything:
Fetches campaigns from the API
Shows a loading skeleton while fetching
Displays campaigns in a horizontal scrollable list
Tracks impressions automatically
Opens the campaign detail page on click
3. (Optional) Open Campaign Details In-App
By default, tapping a campaign opens the detail page in Safari. To keep users inside your app using an in-app WebView:
When openInApp is true, the SDK presents an MCWebViewController from the nearest UIViewController in the responder chain. You can also set a title for the in-app WebView:
Tip: For tighter control over which view controller is used to present the WebView, set
adView.presentingController = selfon your containingUIViewController.
4. What Happens Behind the Scenes
When you call adView.load(), the SDK:
Shows a pulsing skeleton placeholder that matches the layout direction
Calls the API to fetch campaigns
Replaces the skeleton with the campaign list
Fires impression pixels automatically when each campaign becomes visible
Opens the campaign detail page (in Safari or an in-app WebView) when the user taps a campaign
No manual tracking or click handling is needed.
Next Steps
Want to customize the look and feel with small effort? See Customizations →
Need a completely different card design? See Custom Layouts →
Need the full data reference? See Data Reference →
Last updated