Classes
Adrop
The main class of the SDK. Manages SDK initialization and global settings.Static Methods
Static Properties
Initialize Method
Bool
default:"false"
Production mode. Set to
true when deployingBool
default:"false"
Whether to use in-app browser. If
true, ad clicks open within the app[String]?
default:"nil"
Array of target country codes (e.g., [“KR”, “US”]).
nil for all countriesSet User Identifier
String
required
Unique ID to identify the user (max 100 characters)
Set Theme
AdropTheme
required
App theme (light, dark, auto)
AdropBanner
Class for displaying banner ads. Inherits fromUIView.
Initialization
String
required
Banner ad unit ID created in the Ad Control Console
String
Contextual targeting ID (default: empty string)
Methods
Static Methods
Static Properties
Properties
Usage Example:
AdropNativeAd
Class for managing native ad data.Initialization
String
required
Native ad unit ID created in the Ad Control Console
String
Contextual targeting ID (default: empty string)
Methods
Static Methods
Static Properties
Properties
Usage Example:
AdropInterstitialAd
Class for displaying interstitial ads.Initialization
String
required
Interstitial ad unit ID created in the Ad Control Console
Methods
show Method
UIViewController
required
Root view controller to present the ad from
Properties
Usage Example:
AdropRewardedAd
Class for displaying rewarded ads.Initialization
String
required
Rewarded ad unit ID created in the Ad Control Console
Methods
show Method
UIViewController
required
Root view controller to present the ad from
(_ type: Int, _ amount: Int) -> Void
required
Closure called when user earns a reward.
type is the reward type and amount is the reward amount set in Ad Control Console.Properties
Usage Example:
AdropPopupAd
Class for displaying popup ads.Initialization
String
required
Popup ad unit ID created in the Ad Control Console
Methods
show Method
UIViewController
required
Root view controller to present the ad from
Properties
Usage Example:
AdropSplashAd
Class for managing splash ads.AdropSplashAd cannot be instantiated directly (the initializer is internal). Use AdropSplashAdViewController or AdropSplashAdView to display splash ads.Properties
AdropSplashAdViewController
View controller for displaying splash ads in full screen.Initialization
String
required
Splash ad unit ID created in the Ad Control Console
TimeInterval
default:"1"
Ad request timeout in seconds
Methods
Properties
Usage Example:
AdropSplashAdView
View for displaying splash ads. Inherits fromUIImageView.
Initialization
String
required
Splash ad unit ID created in the Ad Control Console
TimeInterval
default:"1"
Ad request timeout in seconds
Loading happens automatically on initialization. Do not call
load() directly.Properties
AdropMetrics
Class for managing user properties and events.Static Properties
Static Methods
Set User Property
String
required
Property key (max 64 characters)
Any
required
Property value (supports String, Int, Double, Bool)
Get Properties
setProperty(key:value:).
Usage Example:
Send Event
String
required
Event name (1–64 characters)
[String: Any]?
Event parameters dictionary. Keys max 64 characters, string values max 1024 characters.
- Event name must be 1–64 characters.
- Duplicate events with the same name and parameters are throttled (500ms window).
- The SDK must be initialized before calling
sendEvent().
Log Event (Deprecated)
Protocols (Delegates)
AdropBannerDelegate
Protocol for handling banner ad lifecycle events.Required Methods
Optional Methods
AdropBanner.loads(...).
AdropBanner.loads(...) fails.
AdropNativeAdDelegate
Protocol for handling native ad lifecycle events.Required Methods
Optional Methods
AdropNativeAd.loads(...).
AdropNativeAd.loads(...) fails.
AdropInterstitialAdDelegate
Protocol for handling interstitial ad lifecycle events.Required Methods
Optional Methods
AdropRewardedAdDelegate
Protocol for handling rewarded ad lifecycle events.Required Methods
Optional Methods
AdropPopupAdDelegate
Protocol for handling popup ad lifecycle events.Required Methods
Optional Methods
AdropPopupAdCloseDelegate
Protocol for handling popup ad close events.Optional Methods
AdropSplashAdDelegate
Protocol for handling splash ad lifecycle events. All methods are@objc optional.
Optional Methods
impressed indicates whether the ad was fully displayed.
AdropSplashAdViewDelegate
Protocol for handling splash ad view lifecycle events.Required Methods
impressed indicates whether the ad was fully displayed.
Optional Methods
UseCustomClick
Protocol for handling custom ad click behavior. Implemented byAdropBanner, AdropNativeAd, and AdropPopupAd.
Enums
AdropErrorCode
Error codes that can occur during ad loading and display.Error Code Descriptions
Network RelatedERROR_CODE_NETWORK: Network connection error occurred. Check internet connection.
ERROR_CODE_INITIALIZE: SDK is not initialized. CallAdrop.initialize()first.
ERROR_CODE_INVALID_UNIT: Invalid unit ID. Verify in the console.ERROR_CODE_NOT_TARGET_COUNTRY: Current user’s country is not a target country.
ERROR_CODE_AD_INACTIVE: No active campaigns for this unit.ERROR_CODE_AD_NO_FILL: No ads available to display.ERROR_CODE_AD_BACKFILL_NO_FILL: No backfill ads available either.
ERROR_CODE_AD_LOAD_DUPLICATED: Already loading an ad.ERROR_CODE_AD_LOADING: Ad is still loading.ERROR_CODE_AD_EMPTY: Must load ad before displaying.ERROR_CODE_AD_SHOWN: Ad already shown. Load a new ad.ERROR_CODE_AD_HIDE_FOR_TODAY: User selected “Don’t show today”.
ERROR_CODE_INTERNAL: Internal error occurred.ERROR_CODE_ACCOUNT_USAGE_LIMIT_EXCEEDED: Account ad usage limit exceeded.ERROR_CODE_LANDSCAPE_UNSUPPORTED: This ad does not support landscape mode.
AdropTheme
Enum representing app theme settings.
Usage Example:
BrowserTarget
Controls how ad URLs are opened.Structs and Types
AdropNativeAdProfile
Struct containing advertiser profile information.AdropServerSideVerificationOptions
Class for setting server-side verification options for rewarded ads.
Usage Example:
Constants
AdropUnitId
Test unit ID constants.Additional Resources
Banner Ads
Banner ad implementation guide
Native Ads
Native ad implementation guide
Interstitial Ads
Interstitial ad implementation guide
Rewarded Ads
Rewarded ad implementation guide