iOS SDK Code Samples Overview

This section contains various code samples to help you in the development of your app.

Topics Description
Add a Transition Animation How to transition between multiple creatives.
Add Targeting Parameters How to add targeting parameters to a ad unit.
Allow Multiple Ad Sizes How to enable a banner ad to receive multiple ad sizes.
Click Through URL How click throughs work and how to implement them.
Configure SDK Logging How to enable SDK logging and set logging levels.
Configure Video Player Options How to configure video player options.
Control Ad Unit Alignment List of the types of alignments for banner ads.
Control Landing Page Load Visibility How to configure the landing page load behavior on ad clicks.
Force Creative ID How to specify the ID of a creative that should be forced to appear in a placement.
Get Facebook Demand for Native How to get assets for Facebook native ads.
Initialize SDK Settings in iOS How to initialize SDK Settings in iOS.
Lazy Loading an Ad Unit How to lazy load an ad unit to control when trackers, including 3rd party trackers, are fired.
Listen to Native Ad Events How to listen to events, such as Ad Click, in native ads.
Listener for Ad About To Expire Listener for ads which are about to expire and are expired.
Location Controls How to control the location accuracy of our SDK.
Localize Browser OK Button How to add localization to a browser's OK button.
OMID Friendly Obstruction How to obstruct views from the Open Measurement Software Development Kit.
Open Ad Clicks in the Native Browser How to choose if native browser will open if the ad is clicked.
Pass Custom Keywords How to pass custom keywords to the request body.
Publisher Side User Opt-Out How to enable the publishers to set the information of users' choice of opt-in/out from tracking in the AdRequests.
Receive Ad View Status Events How to receive status events for the ad unit.
Request Ads Over HTTPS How to request ads over HTTPS.
Resize Ads to fit the Screen or Banner Ad View How to resize ads to fit its container.
Resize the Banner Ad View to the Size of the Winning Creative How to resize the ad unit to fit the creative size.
Set Auction Timeout How to set the auction timeout.
Set IDFA usage for iOS How to enable or disable IDFA usage for iOS.
Set Reserve Prices How to minimum bid amount you'll accept to show an ad.
Set Test Mode How to enable test mode for AdRequest execution.
Support for Overriding Country and Zip Codes How to override country codes and zip codes.
Support to Pass Traffic Source and External Inventory Codes How to break out inventory more granularly than the placement level.
Toggle PSAs How to enable PSAs.
User ID Mapping How to map an external user ID and publisher first party ID to a Xandr user ID.