# iOS deprecated APIs

> Identify deprecated Unity Ads SDK classes for iOS (Objective-C), as well as the replacement and removal versions.

## iOS deprecated classes (Objective-C)

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

| **API to be removed**                                                                                                                                                                                                           | **Deprecated in version** | **What to use instead**                                                                                  | **Removed in version** | **Depreciation reason**                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------- | ---------------------- | -------------------------------------------------------- |
| `UnityAdsDelegate`                                                                                                                                                                                                              | NA                        | Use the `UnityAdsInitializationDelegate`, `UnityAdsLoadDelegate`, and `UnityAdsShowDelegate` interfaces. | 4.0.0                  | Replaced by consolidated `Initialize` API.               |
| `UnityAdsDelegateUtil`                                                                                                                                                                                                          | NA                        | Use the `UnityAdsInitializationDelegate`, `UnityAdsLoadDelegate`, and `UnityAdsShowDelegate` interfaces. | 4.0.0                  | Replaced by consolidated `Initialize` API.               |
| `UADSInAppPurchaseMetaData`                                                                                                                                                                                                     | NA                        | No direct replacement; however you can use the generic `MetaData` class.                                 | 4.0.0                  | Replaced by consolidated `Initialize` API.               |
| `UnityAdsExtendedDelegate`                                                                                                                                                                                                      | NA                        | Use the `UnityAdsInitializationDelegate`, `UnityAdsLoadDelegate`, and `UnityAdsShowDelegate` interfaces. | 4.0.0                  | Replaced by consolidated `Initialize` API.               |
| ```objective-c
initialize: (NSString *)gameId
delegate: (nullable id&#x3-c;-unity-ads-delegate>)
```                                                                                                                            | 3.4.0                     | Use the consolidated `Initialize` method signature.                                                      | 4.0.0                  | Replaced by consolidated `Initialize` API.               |
| ```objective-c
initialize: (NSString *)gameId
delegate: (nullable id&#x3-c;-unity-ads-delegate>)delegate
testMode: (BOOL)testMode
```                                                                                           | 3.4.0                     | Use the consolidated `Initialize` method signature.                                                      | 4.0.0                  | Replaced by consolidated Initialize API.                 |
| ```objective-c
initialize: (NSString *)gameId
delegate: (nullable id&#x3-c;-unity-ads-delegate>)delegate
testMode: (BOOL)testMode
enablePerPlacementLoad: (BOOL)enablePerPlacementLoad
```                                      | 3.4.0                     | Use the consolidated `Initialize` method signature.                                                      | 4.0.0                  | Replaced by consolidated Initialize API.                 |
| ```text
initialize: (NSString *)gameId
testMode: (BOOL)testMode
enablePerPlacementLoad: (BOOL)enablePerPlacementLoad
```                                                                                                        | 3.4.0                     | Use the consolidated `Initialize` method signature.                                                      | 4.0.0                  | Replaced by consolidated `initialize` API.               |
| ```text
initialize: (NSString *)gameId
testMode: (BOOL)testMode
enablePerPlacementLoad: (BOOL)enablePerPlacementLoad
initializationDelegate: (nullable id&#x3-c;-unity-ads-initialization-delegate>)initializationDelegate;
``` | 3.4.0                     | Use the consolidated `Initialize`] method signature.                                                     | 4.0.0                  | Replaced by consolidated `initialize` API.               |
| `show: (UIViewController *)viewController`                                                                                                                                                                                      | 3.7.0                     | Use the updated `show` method signature.                                                                 | 4.0.0                  | Introduced a `show` API with callbacks.                  |
| ```text
show: (UIViewController *)viewController
placementId: (NSString *)placementId
```                                                                                                                                       | 3.7.0                     | Use the updated `show` method signature.                                                                 | 4.0.0                  | Introduced a `show` API with callbacks.                  |
| ```text
show: (UIViewController *)viewController
placementId: (NSString *)placementId
options: (UADSShowOptions *)options
```                                                                                                   | 3.7.0                     | Use the updated `show` method signature.                                                                 | 4.0.0                  | Introduced a `Show` API with callbacks.                  |
| `getDelegate`                                                                                                                                                                                                                   | 3.4.0                     | Use the `Initialize`, `load`, and `show` methods' delegate interfaces.                                   | 4.0.0                  | No longer required with `Load` and `Show` functionality. |
| `setDelegate: (id&#x3-c;-unity-ads-delegate>)delegate`                                                                                                                                                                          | 3.4.0                     | Use the `Initialize`, `load`, and `show` methods' delegate interfaces.                                   | 4.0.0                  | No longer required with `Load` and `Show` functionality. |
| `addDelegate: (__nullable id&#x3-c;-unity-ads-delegate>)delegate`                                                                                                                                                               | 3.7.0                     | Use the `Initialize`, `load`, and `show` methods' delegate interfaces.                                   | 4.0.0                  | No longer required with `Load` and `Show` functionality. |
| `removeDelegate: (id&#x3-c;-unity-ads-delegate>)delegate;`                                                                                                                                                                      | NA                        | Use the `Initialize`, `load`, and `show` methods' delegate interfaces.                                   | 4.0.0                  | No longer required with Load and Show functionality.     |
| `isReady`                                                                                                                                                                                                                       | 3.7.1                     | Use the updated `load` method signature.                                                                 | 4.0.0                  | Introduced a `load` API with callbacks.                  |
| `isReady: (NSString *)placementId`                                                                                                                                                                                              | 3.7.1                     | Use the updated `load` method signature.                                                                 | 4.0.0                  | Introduced a `load` API with callbacks.                  |
| `getPlacementState`                                                                                                                                                                                                             | NA                        | No direct replacement.                                                                                   | 4.0.0                  | No longer required with `Load` and `Show` functionality. |
| `getPlacementState: (NSString *)placementId`                                                                                                                                                                                    | NA                        | No direct replacement.                                                                                   | 4.0.0                  | No longer required with `Load` and `Show` functionality. |
| All of the `monetization` classes                                                                                                                                                                                               | 3.4.0                     | Use the `UnityAdvertisement.h` class.                                                                    | 4.0.0                  | Legacy `Monetization` API not supported.                 |
| All of the `purchasing` classes                                                                                                                                                                                                 | 3.4.0                     | No direct replacement.                                                                                   | 4.0.0                  | Legacy `Monetization` API not supported.                 |
