# Multiple

Designed for lists or waterfall-type layouts.

This guide will show you how to use the Adx3 Ads SDK to implement multiple ads in an iOS app.

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* Complete the [Getting Started Guide](/interface-documentation/ios/get-started/getting-started-guide.md)

### Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to the suspension of your account. The easiest way to load test ads is to use our dedicated test ad unit ID for  ads on iOS:

```
63a573c07144f
```

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

### Implementation <a href="#implementation" id="implementation"></a>

* Load an ad
* Create an Adx3CustomAdView
* Display the ad

### Load an ad

Loading an ad is accomplished using the static loadCustomAdWithPlacementID: userId: success: error: method on the  Adx3CustomAdManager class. The load method requires your ad unit ID, a userId object, and a completion handler which gets called when ad loading succeeds or fails. userId object can not be passed or your custom for user identifier. The below example shows how to load a ad.

{% tabs %}
{% tab title="Swift" %}

```swift
func loadCustomAd() {    
    Adx3CustomAdManager().loadCustomAd(withPlacementID: "Your Placement ID", userId: "") { adCount in
    
    } error: { error in
            
    }
}
```

{% endtab %}

{% tab title="Objective-C" %}

```objectivec
- (void)loadCustomAd {
    [[Adx3CustomAdManager manager] loadCustomAdWithPlacementID:CUSTOM_ID userId:@"" success:^(NSInteger adCount) {

    } error:^(NSError * _Nonnull error) {
    
    }];
}
```

{% endtab %}
{% endtabs %}

### Create a Adx3CustomAdView

You must custom your own Adx3CustomAdView, the relevant sub-controls have been declared for you, The layout needs to be defined manually by yourself.

### Display the ad

To display multiple ads, you need to call the loadCustomAdView: index:  location: method on Adx3CustomAdManager class. This method requires you to provide a custom Adx3CustomAdView, and the index is the subscript of Adx3CustomAdView. location is the location on the screen when you touch Adx3CustomAdView, the purpose is to provide you with more accurate multiple advertisement services.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.adx3.io/interface-documentation/ios/ad-formats/multiple.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
