Documentation

Unity Ads Monetization


iOS API reference - Swift

iOS API reference - Objective-C

Unity Ads Monetization


iOS deprecated APIs

Identify deprecated Unity Ads SDK classes for iOS, as well as the replacement and removal versions.
Read time 4 minutesLast updated a day ago

iOS deprecated classes

The following API classes are deprecated or obsolete for the iOS SDK for the Unity Ads SDK version 4.19.0.

Initialization

API to be removed

Deprecated in version

What to use instead

Removed in version

Deprecation reason

UADSMediationMetaData
4.19.0
UADSMediationInfo
— initialized with
initWithName:version:adapterVersion:
5.0.0Replaced by the typed
UADSMediationInfo
value object used in the builder-based initialization API.
[UnityAds setDebugMode:]
4.19.0Set
UADSLogLevel
via
[UADSInitializationConfigurationBuilder withLogLevel:]
(e.g.
UADSLogLevelDebug
)
5.0.0The boolean debug-mode toggle is replaced by a 4-level
UADSLogLevel
set on the initialization configuration builder, giving finer control over log verbosity.
[UnityAds initialize:]
and all overloads (
initializationDelegate:
,
testMode:
,
testMode:initializationDelegate:
)
4.19.0
[UnityAds initialize:[builder build] completion:^(id<UnityAdsError> error){…}]
using
UADSInitializationConfigurationBuilder
5.0.0Replaced by the builder-pattern initialization API with a completion block instead of a delegate.
UnityAdsInitializationDelegate
protocol
4.19.0Pass a completion block
^(id<UnityAdsError> error)
to the new
[UnityAds initialize:completion:]
method
5.0.0Delegate-based initialization callback replaced by completion blocks for simpler, inline error handling.

Interstitial ads

API to be removed

Deprecated in version

What to use instead

Removed in version

Deprecation reason

[UnityAds load:options:loadDelegate:]
(interstitial)
4.19.0
[UADSInterstitialAd load:[builder build] completion:^(UADSInterstitialAd *ad, id<UnityAdsError> error){…}]
5.0.0Class method on UnityAds replaced by an instance method on the loaded ad object, with the result delivered via a completion block.
UnityAdsLoadDelegate
protocol (interstitial)
4.19.0Pass a completion block to
[UADSInterstitialAd load:completion:]
5.0.0Delegate callbacks replaced by completion blocks in the instance-based ad loading API.
UADSLoadOptions.adMarkup
(interstitial)
4.19.0
[UADSLoadConfigurationBuilder withAdMarkup:]
5.0.0Mutable property replaced by an immutable builder-pattern configuration.
UADSLoadOptions.objectId
(interstitial)
4.19.0No replacement — object ID is now managed internally by the SDK5.0.0Manual correlation IDs are no longer required; the SDK handles ad instance tracking internally.
[UnityAds show:placementId:options:showDelegate:]
(interstitial)
4.19.0
[self.interstitialAd show:[builder build] delegate:delegate]
on the
UADSInterstitialAd
instance
5.0.0Class method on UnityAds replaced by an instance method on the loaded ad object.
UnityAdsShowDelegate
protocol (interstitial)
4.19.0
UADSInterstitialShowDelegate
with
showDidStart:
,
showDidClick:
,
showDidComplete:with:
,
showDidFail:error:
5.0.0Generic show delegate replaced by an ad-type-specific delegate that passes the ad instance rather than a placement ID string.
UADSShowOptions.objectId
(interstitial)
4.19.0No replacement — object ID is now managed internally by the SDK5.0.0Manual correlation IDs are no longer required; the SDK handles ad instance tracking internally.
UADSShowOptions
(interstitial)
4.19.0
UADSShowConfigurationBuilder
— use
withViewController:
5.0.0Mutable options object replaced by an immutable builder-pattern show configuration.

Rewarded ads

API to be removed

Deprecated in version

What to use instead

Removed in version

Deprecation reason

[UnityAds load:options:loadDelegate:]
(rewarded)
4.19.0
[UADSRewardedAd load:[builder build] completion:^(UADSRewardedAd *ad, id<UnityAdsError> error){…}]
5.0.0Class method on UnityAds replaced by an instance method on the loaded ad object, with the result delivered via a completion block.
UnityAdsLoadDelegate
protocol (rewarded)
4.19.0Pass a completion block to
[UADSRewardedAd load:completion:]
5.0.0Delegate callbacks replaced by completion blocks in the instance-based ad loading API.
UADSLoadOptions.adMarkup
(rewarded)
4.19.0
[UADSLoadConfigurationBuilder withAdMarkup:]
5.0.0Mutable property replaced by an immutable builder-pattern configuration.
UADSLoadOptions.objectId
(rewarded)
4.19.0No replacement — object ID is now managed internally by the SDK5.0.0Manual correlation IDs are no longer required; the SDK handles ad instance tracking internally.
[UnityAds show:placementId:options:showDelegate:]
(rewarded)
4.19.0
[self.rewardedAd show:[builder build] delegate:delegate]
on the
UADSRewardedAd
instance
5.0.0Class method on UnityAds replaced by an instance method on the loaded ad object.
UnityAdsShowDelegate
protocol (rewarded)
4.19.0
UADSRewardedShowDelegate
with a dedicated
showDidReceiveReward:
callback
5.0.0Generic show delegate replaced by a rewarded-specific delegate with a dedicated reward callback.
UADSShowOptions.objectId
(rewarded)
4.19.0No replacement — object ID is now managed internally by the SDK5.0.0Manual correlation IDs are no longer required; the SDK handles ad instance tracking internally.
UADSPlayerMetaData
(
-setServerId:
)
4.19.0
[UADSShowConfigurationBuilder withCustomRewardString:]
on the
UADSShowConfiguration
passed into
-[UADSRewardedAd show:delegate:]
5.0.0The metadata-based server-side reward verification ID is replaced by a typed
customRewardString
on the show configuration, consistent with the builder-based ad object API.
kUnityShowCompletionStateCompleted
,
kUnityShowCompletionStateSkipped
4.19.0
UADSShowFinishStateCompleted
,
UADSShowFinishStateSkipped
5.0.0Constants renamed as part of the unified
UADSShowFinishState
type.
UnityAdsShowCompletionState
4.19.0
UADSShowFinishState
5.0.0Enum type renamed for consistency with the new instance-based ad API.

API to be removed

Deprecated in version

What to use instead

Removed in version

Deprecation reason

UADSBannerView
4.19.0
UADSBannerAd
— access the view via the
.view
property and add it to your hierarchy
5.0.0Direct view class replaced by an ad instance object whose view is accessed via a property, consistent with the new ad object model.
UADSBannerViewDelegate
protocol
4.19.0
UADSBannerAdDelegate
with
bannerImpression:
,
bannerDidClick:
,
bannerDidFailShow:error:
5.0.0View-level delegate replaced by an ad-object delegate. The load result moves into the
load(_:completion:)
completion handler;
bannerViewDidLeaveApplication:
is removed with no replacement.
bannerViewDidLoad:
on
UADSBannerViewDelegate
4.19.0Load result is now delivered via the
UADSBannerAd.load(_:completion:)
completion block — no delegate callback
5.0.0Load notification moved out of the delegate and into the load completion block, matching the new interstitial and rewarded loading pattern.
bannerViewDidLeaveApplication:
on
UADSBannerViewDelegate
4.19.0No replacement5.0.0Callback removed with no equivalent in the new
UADSBannerAdDelegate
.
[[UADSBannerView alloc] initWithPlacementId:size:]
+
[banner loadWithOptions:]
4.19.0
[UADSBannerAd load:[builder build] completion:^(UADSBannerAd *ad, id<UnityAdsError> error){…}]
via
UADSBannerLoadConfigurationBuilder
5.0.0Constructor + separate load method replaced by a unified static load with a builder configuration and a completion block, matching the new interstitial and rewarded loading pattern.
UADSBannerLoadOptions
4.19.0
UADSBannerLoadConfiguration
built via
UADSBannerLoadConfigurationBuilder
5.0.0Banner-specific mutable load options object replaced by an immutable builder-pattern configuration.
UADSLoadOptions.adMarkup
(banner)
4.19.0
[UADSBannerLoadConfigurationBuilder withAdMarkup:]
5.0.0Mutable property replaced by an immutable builder-pattern configuration.
UADSLoadOptions.objectId
(banner)
4.19.0No replacement — object ID is now managed internally by the SDK5.0.0Manual correlation IDs are no longer required; the SDK handles ad instance tracking internally.

Token collection (bidding)

API to be removed

Deprecated in version

What to use instead

Removed in version

Deprecation reason

+[UnityAds getToken]
,
+[UnityAds getToken:]
,
+[UnityAds getTokenWith:completion:]
4.19.0
+[UnityAds getToken:completion:]
with a
UADSTokenConfigurationBuilder
-built configuration
5.0.0The no-arg getter, the completion-only getter, and the legacy
UnityAdsTokenConfiguration
overload are all replaced by a single entry point that takes a typed
UADSTokenConfiguration
built via
UADSTokenConfigurationBuilder
.
UnityAdsTokenConfiguration
+
[UnityAdsTokenConfiguration newWithAdFormat:]
4.19.0
UADSTokenConfigurationBuilder
— use
initWithAdFormat:
,
withMediationInfo:
, optionally
withBannerSize:
5.0.0Configuration object replaced by a builder, enabling mediation info and banner size to be included in a consistent pattern.
UnityAdsAdFormat
enum
4.19.0
UADSAdFormat
enum with values
UADSAdFormatBanner
,
UADSAdFormatInterstitial
,
UADSAdFormatRewarded
5.0.0Enum renamed for namespace consistency with the new
UADS
-prefixed API surface.

Privacy

API to be removed

Deprecated in version

What to use instead

Removed in version

Deprecation reason

UADSMetaData
with key
gdpr.consent
4.19.0
[UnityAds setUserConsent:]
5.0.0String key-value privacy metadata replaced by a typed static method.
UADSMetaData
with key
privacy.consent
(CCPA)
4.19.0
[UnityAds setUserOptOut:]
— pass
YES
when the user has opted out (Do Not Sell)
5.0.0String key-value privacy metadata replaced by a typed static method with explicit opt-out semantics.
UADSMetaData
with key
user.nonBehavioral
(COPPA, child-directed laws)
4.19.0
[UnityAds setNonBehavioral:]
5.0.0Privacy mode string replaced by an explicit boolean API for non-behavioral/contextual ad control.

Error handling

API to be removed

Deprecated in version

What to use instead

Removed in version

Deprecation reason

UnityAdsInitializationError
enum
4.19.0Unified
id<UnityAdsError>
protocol with
.code
(NSInteger) and
.message
(NSString)
5.0.0Separate per-operation error enums replaced by a unified error protocol with standardized numeric codes.
UnityAdsLoadError
enum
4.19.0Unified
id<UnityAdsError>
protocol
5.0.0Separate per-operation error enums replaced by a unified error protocol with standardized numeric codes.
UnityAdsShowError
enum
4.19.0Unified
id<UnityAdsError>
protocol
5.0.0Separate per-operation error enums replaced by a unified error protocol with standardized numeric codes.
UADSBannerErrorCode
enum
4.19.0Unified
id<UnityAdsError>
protocol
5.0.0Banner-specific error enum replaced by the same unified error protocol used across all ad types.