<img src="https://img.shields.io/badge/%20-ENTERPRISE-B10031" style="float:left"/><br /> <img src="https://img.shields.io/badge/iOS-V4-009727?logo=apple" style="float:left"/><br />

The iOS SDK includes the <a href="https://iabtechlab.com/standards/open-measurement-sdk/" target="_blank">Open Measurement (OM) SDK</a>. By default, the Open Measurement functionality is disabled. When enabled, the OM SDK supports several ad-related features for VAST ads:

  • Third-party viewability

  • Verification measurement

  • Vendor restrictions

If instead you are interested in utilizing the OM SDK for use with Google IMA, please refer to the documentation on <a href="https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side/omsdk" target="_blank">Open Measurement in the Google IMA SDK</a>.

<br /> <hr />

## Requirements

**Google IMA SDK**3.9.0+
**Ads configured to traffic<br />`AdVerifications` in their VAST**<ul><li>`<AdVerifications>` <sup><a href="https://iabtechlab.com/wp-content/uploads/2018/06/VAST4.1-June7-FINAL.pdf" target="_blank">VAST 4.1+</a></sup></li><li>`<Extension type="AdVerifications">` <sup>\< VAST 4.1</sup></li></ul>

<br /> <hr />

## Enable Open Measurement

Refrain from covering the `JWPlayerView` with any overlays (transparent or opaque). These will be flagged as obstructions by the OM SDK and reduce viewability.

<br />

Use the following steps to enable the Open Measurement functionality:

  1. (Optional) Create an array of vendors allowed to execute scripts within the `AdVerifications`. If a verification script from an unauthorized vendor is found within an ad, the `verificationNotExecuted` script will be executed for the ad as per Open Measurement’s standard. If not defined, all vendors are assumed to be approved.

  2. Use `JWOMIDConfigBuilder()` to create an Open Measurement config, `JWOMIDConfig`. If defined in the previous step, be sure to pass the array of vendor allowed to execute scripts.

  3. Use `JWPlayerConfigurationBuilder()` to add the `JWOMIDConfig` to the player config.

<br />

<br /> <hr />

## Manage friendly obstructions

If you use `JWPlayerViewController`, friendly obstructions within the interface are reported and handled. However, if you do not use `JWPlayerViewController` or want to prevent other `UIViews` from affecting ad viewability, you should register these obstructions as friendly.

The following examples apply to JWP VAST and Google IMA/DAI ad clients.

<br />

### Register a friendly obstruction

  1. Create a list of one or more `JWFriendlyObstruction`. Be sure to supply the `purpose` (using predefined constants) and the `reason` the obstruction is friendly.

  2. Use `func register(_ obstructions: [JWFriendlyObstruction])` to register the obstructions with the player.


<br /> <br />

### Deregister a friendly obstruction

To deregister friendly obstructions, use one of the following approaches:

  • Deregister a defined list of friendly obstructions when calling `func register(_ obstructions: [JWFriendlyObstruction])`

  • Deregister all registered `JWFriendlyObstruction` objects.


<br />

<!-- Removes the automatic page-to-page navigation at the bottom of the page -->

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