---
updatedAt: 2026-09-25T15:47:42.000Z
agentTools:
  siteIndex: https://docs.jwplayer.com/llms.txt
  projectIndex: https://docs.jwplayer.com/players/llms.txt
---

# Create an ad tag waterfall (iOS)

Increase revenue-generating opportunities in your iOS app with an array of ad tags.

Creating an ad tag waterfall helps you to maximize ad revenue by attempting to show a valid ad to your viewers during an ad break. When you create an ad tag waterfall, you assign an array of ad tags to a single ad break. The player displays the ad of the first tag that returns a valid response.

Use the following steps to create an ad tag waterfall:

1. Define the ad break `offset`. In the following example, the ad break is a pre-roll ad break.
2. Pass an array of ad tags to <a href="https://sdk.jwplayer.com/ios/v4/reference/Classes/JWAdBreakBuilder.html" target="_blank">JWAdBreakBuilder()</a>. If the ad tags are valid, `JWAdBreakBuilder()` builds a `JWAdBreak` object.
3. Follow the remaining steps to set up an ad break with [VAST](https://docs.jwplayer.com/players/docs/ios-schedule-vast-ads) or [Google IMA](https://docs.jwplayer.com/players/docs/ios-schedule-google-ima-ads) ads.

<br />

```swift
let adBreak = try? JWAdBreakBuilder()
    .offset(.pre)
    .tags([URL(string:"ad-tag-url-1.xml")!,
           URL(string:"ad-tag-url-2.xml")!,
           URL(string:"ad-tag-url-3.xml")!])
    .build()
```
```objectivec
JWError *error;
JWAdBreakBuilder *builder = [[JWAdBreakBuilder alloc] init];
[builder tags: @[[NSURL URLWithString:@"ad-tag-url-1.xml"],
                 [NSURL URLWithString:@"ad-tag-url-2.xml"],
                 [NSURL URLWithString:@"ad-tag-url-3.xml"]]];
JWAdOffset *offset = [JWAdOffset preroll];
[builder offset: offset];
JWAdBreak *adBreak = [builder buildAndReturnError:&error];
```

<br />

<style>
.rm-Pagination {
  display: none;
}
</style>

# Sibling pages

* [iOS Ad Tag Targeting Macro Reference (iOS)](https://docs.jwplayer.com/players/docs/ios-ad-tag-targeting-macro-reference.md)