Deprecated API classes

Unity (C#)

The following API classes are deprecated or obsolete for the Unity SDK:

API to be removedDeprecated in versionWhat to use insteadRemoved in versionDepreciation reason
IsReady()NAUse the updated Load method signature to access load callbacks.4.0.0No longer required with Load and Show functionality.
IsReady(string placementId)NAUse the updated Load method signature to access load callbacks.4.0.0No longer required with Load and Show functionality.
AddListener(IUnityAdsListener listener)NAUse the Initialize, Load, and Show methods' listeners.4.0.0Improved callbacks for Load and Show APIs.
RemoveListener(IUnityAdsListener listener)NAUse the Initialize, Load, and Show methods' listeners.4.0.0Improved callbacks for Load and Show APIs.
GetPlacementState()NANo direct replacement.4.0.0Improved callbacks for Load and Show APIs.
GetPlacementState(string placementId)NANo direct replacement.4.0.0No longer required with Load and Show functionality.
IUnityAdsListenerNAUse the IUnityAdsInitializationListener,IUnityAdsLoadListener, and IUnityAdsShowListener interfaces.4.0.0Improved callbacks for Load and Show APIs.
Show()NAUse the Show(string placementId) method signature to specify an Ad Unity ID.4.0.0Updated Load and Show functionality.
ShowOptions.resultCallback3.1.0Use the IUnityAdsShowListener interface callbacks.4.0.0Updated Load and Show functionality.

Android (Java)

The following API classes are deprecated or obsolete for the Android SDK:

API to be removedDeprecated in versionWhat to use insteadRemoved in versionDepreciation reason
initialize(final Activity activity, final String gameId, final IUnityAdsListener listener)3.4.0Use the consolidated initialize method signature.4.0.0Replaced by consolidated initialize API.
initialize(final Activity activity, final String gameId)3.4.0Use the consolidated initialize method signature.4.0.0Replaced by consolidated initialize API.
initialize(final Activity activity, final String gameId, final IUnityAdsInitializationListener initializationListener)3.4.0Use the consolidated initialize method signature.4.0.0Replaced by consolidated initialize API.
initialize(final Activity activity, final String gameId, final IUnityAdsListener listener, final boolean testMode)3.4.0Use the consolidated initialize method signature.4.0.0Replaced by consolidated initialize API.
initialize(final Activity activity, final String gameId, final boolean testMode)3.4.0Use the consolidated initialize method signature.4.0.0Replaced by consolidated initialize API.
initialize(final Activity activity, final String gameId, final boolean testMode, final IUnityAdsInitializationListener initializationListener)3.4.0Use the consolidated initialize method signature.4.0.0Replaced by consolidated initialize API.
initialize(final Activity activity, final String gameId, final IUnityAdsListener listener, final boolean testMode, final boolean enablePerPlacementLoad)3.4.0Use the consolidated initialize method signature.4.0.0Replaced by consolidated initialize API.
initialize(final Activity activity, final String gameId, final boolean testMode, final boolean enablePerPlacementLoad)3.4.0Use the consolidated initialize method signature.4.0.0Replaced by consolidated initialize API.
initialize(final Activity activity, final String gameId, final boolean testMode, final boolean enablePerPlacementLoad, final IUnityAdsInitializationListener initializationListener)3.4.0Use the consolidated initialize method signature.4.0.0Replaced by consolidated initialize API.
initialize(final Context context, final String gameId, final boolean testMode, final boolean enablePerPlacementLoad)NAUse the consolidated initialize method signature.4.0.0Replaced by consolidated initialize API.
initialize(final Context context, final String gameId, final boolean testMode, final boolean enablePerPlacementLoad, final IUnityAdsInitializationListener initializationListener)NAUse the consolidated initialize method signature.4.0.0Replaced by consolidated initialize API.
setListener(IUnityAdsListener listener)3.4.0Use the initialize, load, and show methods' listeners.4.0.0Improved callbacks for Show and Load APIs.
getListener()3.4.0Use the initialize, load, and show methods' listeners.4.0.0Improved callbacks for Show and Load APIs.
addListener(IUnityAdsListener listener)NAUse the initialize, load, and show methods' listeners.4.0.0Improved callbacks for Show and Load APIs.
removeListener(IUnityAdsListener listener)NAUse the initialize, load, and show methods' listeners.4.0.0Improved callbacks for Show and Load APIs.
isReady()3.7.1Use the updated load method signature to access load callbacks.4.0.0Introduced a Load API with callbacks.
isReady(String placementId)3.7.1Use the updated load method signature to access load callbacks.4.0.0Introduced a Load API with callbacks.
getPlacementState()NANo direct replacement.4.0.0No longer required with Load and Show functionality.
show(final Activity activity)3.7.0Use the updated show method signature to access show callbacks.4.0.0Introduced a Show API with callbacks.
IUnityAdsListenerNAUse the IUnityAdsInitializationListener, IUnityAdsLoadListener, IUnityAdsShowListener interfaces.4.0.0Improved callbacks for Show and Load APIs.
IUnityAdsExtendedListenerNAUse the IUnityAdsShowListener interface.4.0.0Improved callbacks for Show and Load APIs.
com.unity3d.services.monetizationNAUse the UnityAds.java API.4.0.0Legacy Monetization API not supported.
com.unity3d.services.purchasingNANo direct replacement.4.0.0Legacy Monetization API not supported.

iOS (Objective-C)

The following API classes are deprecated or obsolete for the iOS SDK:

API to be removedDeprecated in versionWhat to use insteadRemoved in versionDepreciation reason
UnityAdsDelegateNAUse the UnityAdsInitializationDelegate, UnityAdsLoadDelegate, and UnityAdsShowDelegate interfaces.4.0.0Replaced by consolidated Initialize API.
UnityAdsDelegateUtilNAUse the UnityAdsInitializationDelegate, UnityAdsLoadDelegate, and UnityAdsShowDelegate interfaces.4.0.0Replaced by consolidated Initialize API.
UADSInAppPurchaseMetaDataNANo direct replacement; however you can use the generic MetaData class.4.0.0Replaced by consolidated Initialize API.
UnityAdsExtendedDelegateNAUse the UnityAdsInitializationDelegate, UnityAdsLoadDelegate, and UnityAdsShowDelegate interfaces.4.0.0Replaced by consolidated Initialize API.

initialize: (NSString *)gameId
delegate: (nullable id<UnityAdsDelegate>)

3.4.0

Use the consolidated Initialize method signature.

4.0.0Replaced by consolidated Initialize API.
initialize: (NSString *)gameId
delegate: (nullable id<UnityAdsDelegate>)delegate
testMode: (BOOL)testMode
3.4.0

Use the consolidated Initialize method signature.

4.0.0Replaced by consolidated Initialize API.
initialize: (NSString *)gameId
delegate: (nullable id<UnityAdsDelegate>)delegate
testMode: (BOOL)testMode
enablePerPlacementLoad: (BOOL)enablePerPlacementLoad
3.4.0

Use the consolidated Initialize method signature.

4.0.0Replaced by consolidated Initialize API.
initialize: (NSString *)gameId
testMode: (BOOL)testMode
enablePerPlacementLoad: (BOOL)enablePerPlacementLoad
3.4.0

Use the consolidated Initialize method signature.

4.0.0Replaced by consolidated initialize API.
initialize: (NSString *)gameId
testMode: (BOOL)testMode
enablePerPlacementLoad: (BOOL)enablePerPlacementLoad
initializationDelegate: (nullable id<UnityAdsInitializationDelegate>)initializationDelegate;
3.4.0

Use the consolidated Initialize method signature.

4.0.0Replaced by consolidated initialize API.
show: (UIViewController *)viewController3.7.0

Use the updated show method signature.

4.0.0Introduced a show API with callbacks.
show: (UIViewController *)viewController
placementId: (NSString *)placementId
3.7.0

Use the updated show method signature.

4.0.0Introduced a show API with callbacks.
show: (UIViewController *)viewController
placementId: (NSString *)placementId
options: (UADSShowOptions *)options
3.7.0

Use the updated show method signature.

4.0.0Introduced a Show API with callbacks.
getDelegate3.4.0Use the initialize, load, and show methods' delegate interfaces.4.0.0No longer required with Load and Show functionality.
setDelegate: (id<UnityAdsDelegate>)delegate3.4.0Use the initialize, load, and show methods' delegate interfaces.4.0.0No longer required with Load and Show functionality.
addDelegate: (__nullable id<UnityAdsDelegate>)delegate3.7.0Use the initialize, load, and show methods' delegate interfaces.4.0.0No longer required with Load and Show functionality.
removeDelegate: (id<UnityAdsDelegate>)delegate;NAUse the initialize, load, and show methods' delegate interfaces.4.0.0No longer required with Load and Show functionality.
isReady3.7.1

Use the updated load method signature.

4.0.0Introduced a load API with callbacks.
isReady: (NSString *)placementId3.7.1

Use the updated load method signature.

4.0.0Introduced a load API with callbacks.
getPlacementStateNANo direct replacement.4.0.0No longer required with Load and Show functionality.
getPlacementState: (NSString *)placementIdNANo direct replacement.4.0.0No longer required with Load and Show functionality.
All of the monetization classes3.4.0Use the UnityAdvertisement.h class.4.0.0Legacy Monetization API not supported.
All of the purchasing classes3.4.0No direct replacement.4.0.0Legacy Monetization API not supported.