UIView*myTransparentTapOverlay=[[UIViewalloc]initWithFrame:CGRectMake(0,0,300,250)];UIButton*myPauseButton=[[UIButtonalloc]initWithFrame:CGRectMake(0,0,50,10)];// Substitute "myTransparentTapOverlay" and "myPauseButton" with the elements// you want to register as video controls overlays.// Make sure to register before ad playback starts.IMAFriendlyObstruction*overlayObstruction=[[IMAFriendlyObstructionalloc]initWithView:myTransparentTapOverlaypurpose:IMAFriendlyObstructionPurposeNotVisibledetailedReason:@"This overlay is transparent"];IMAFriendlyObstruction*pauseButtonObstruction=[[IMAFriendlyObstructionalloc]initWithView:myPauseButtonpurpose:IMAFriendlyObstructionPurposeMediaControlsdetailedReason:@"This is the video player pause button"];[displayContainerregisterFriendlyObstruction:overlayObstruction];[displayContainerregisterFriendlyObstruction:pauseButtonObstruction];
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eThe IMA SDK for iOS incorporates the Open Measurement (OM) SDK, enabling third-party viewability and verification measurement for ads by automatically sending data to specified vendors.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize Open Measurement, ensure you are using IMA SDK for iOS version 3.9.0 or higher and that your ads are configured to include \u003ccode\u003e<AdVerifications>\u003c/code\u003e tags in their VAST responses.\u003c/p\u003e\n"],["\u003cp\u003eAvoid obstructing the \u003ccode\u003eAdDisplayContainer\u003c/code\u003e with overlays to maintain optimal ad viewability, as these are flagged by the OM SDK and can reduce measured viewability rates.\u003c/p\u003e\n"],["\u003cp\u003eRegister transparent video control overlays as "friendly obstructions" with the IMA SDK to prevent them from negatively impacting viewability measurement, ensuring accurate reporting.\u003c/p\u003e\n"]]],[],null,["Interactive Media Ads (IMA) SDK for iOS.\n\nThe IMA SDK for iOS includes the\n[Open Measurement (OM) SDK](//iabtechlab.com/standards/open-measurement-sdk/),\nan industry standard developed by the\n[Interactive Advertising Bureau (IAB)](//www.iab.com/) to enable third-party\nviewability and verification measurement. When using the IMA SDK for\niOS, the included OM SDK automatically parses\nthe `\u003cAdVerifications\u003e` tag within VAST ad tags and sends viewability data to\nthe specified measurement vendors via the OMID API.The IMA SDK supports OM SDK\nv1.4, GAM AdVerifications extensions on VAST 2+,\nand the AdVerifications node on VAST 4+.To take advantage of Open Measurement,\nkeep the following points in mind:\n\n- To use Open Measurement you must have version\n 3.9.0 or greater of the\n IMA SDK for iOS.\n\n- Ads must be configured to traffic `\u003cAdVerifications\u003e` in their VAST as per\n the [VAST 4.1 spec](//iabtechlab.com/wp-content/uploads/2018/06/VAST4.1-June7-FINAL.pdf)\n if using VAST 4.1+; otherwise, `\u003cExtension type=\"AdVerifications\"\u003e`\n should be used.\n\n- Refrain from covering the `AdDisplayContainer` with any overlays\n (transparent or opaque), since these will be flagged as obstructions by the OM\n SDK and reduce viewability.\n\nPrerequisites\n\n- If your ads are trafficked through Ad Manager, [configure a viewability\n provider for your Ad Manager network](//support.google.com/admanager/answer/9025968#configure-a-viewability-provider) and assign that viewability provider to your line item.\n\nTesting\n\nTo test Open Measurement using the IMA SDK, use one of the required versions of\nthe SDK above, along with a [test ad tag](https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/omid_ad_samples&env=vp&gdfp_req=1&output=vast&sz=640x480&description_url=http%3A%2F%2Ftest_site.com%2Fhomepage&vpmute=0&vpa=0&vad_format=linear&url=http%3A%2F%2Ftest_site.com&vpos=preroll&unviewed_position_start=1&correlator=).\n\nYou should see the `\u003cAdVerifications\u003e` returned in your VAST response.\n\nRegister video controls overlay obstructions\n\nVideo controls such as pause buttons or progress bars provide essential playback\ninformation and actions to users. On mobile, imprecise taps and user\nexpectations have made it common practice to render large, touch-friendly\ncontrols over the media element. These controls usually fade in and out on a\nuser tap and are not visible for the vast majority of playback time.\n\nBelow is an example of video controls rendered by the YouTube app:\n\nWhen using the IMA SDK, most publishers implement these controls by adding a\nview above the ad display container that is mostly transparent. Usually, the\ncontrols are child elements of this view that fully occludes the underlying\nvideo player. This transparent overlay is used to capture tap events and then\nrender the controls to users when tapped.\n\nWhen ad viewability via the Open Measurement SDK is calculated, all views\noverlaying the media element are considered obstructions and reduce the\nviewability rate. In the case where a transparent tap overlay sits above the\nentire ad display container, it is possible for inventory to be declared\ncompletely unviewable.\n\nThe Open Measurement SDK makes provisions for video controls to be considered\n\"friendly\" obstructions that are essential to the user's experience. Once\nregistered as friendly, these controls are excluded from ad viewability\nmeasurement.\n\nWith IAB and MRC support, the IMA SDK introduces an API for registering these\noverlays with the Open Measurement SDK. These controls must be fully transparent\noverlays or small buttons. Any other views not related to video controls must\nnot be registered.\n\n| DO register | DO NOT register |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|\n| - Transparent overlay to capture user taps - Transient buttons - Pause - Play - Fullscreen - Cast/AirPlay - Collapse - Progress/Seek - Other playback relevant actions | - Watermarks - Pop ups - Dialogs - Non-transient buttons - Other obscuring views |\n\nThe following sample code demonstrates how to register video controls overlays\non the ad display container:\n\n\n| **Key Point:** The `detailedReason` string used when creating a [`IMAFriendlyObstruction`](/interactive-media-ads/docs/sdks/ios/client-side/reference/Classes/IMAFriendlyObstruction#detailedreason) must follow the IAB standard by:\n|\n| - Being 50 characters or less.\n| - Only contain characters `A-z`, `0-9`, or spaces\n- The string can be nil. \n\n UIView *myTransparentTapOverlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 250)];\n UIButton *myPauseButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 50, 10)];\n // Substitute \"myTransparentTapOverlay\" and \"myPauseButton\" with the elements\n // you want to register as video controls overlays.\n // Make sure to register before ad playback starts.\n IMAFriendlyObstruction *overlayObstruction =\n [[IMAFriendlyObstruction alloc] initWithView:myTransparentTapOverlay\n purpose:IMAFriendlyObstructionPurposeNotVisible\n detailedReason:@\"This overlay is transparent\"];\n IMAFriendlyObstruction *pauseButtonObstruction =\n [[IMAFriendlyObstruction alloc] initWithView:myPauseButton\n purpose:IMAFriendlyObstructionPurposeMediaControls\n detailedReason:@\"This is the video player pause button\"];\n\n [displayContainer registerFriendlyObstruction:overlayObstruction];\n [displayContainer registerFriendlyObstruction:pauseButtonObstruction];\n\nWhen you're done with them, these obstructions can be removed by calling the\nfollowing method:\n\n [displayContainer unregisterAllFriendlyObstructions];\n\n| **Note:** For information on measurement and verification providers that have committed to the development of this new viewability standard, see the [IAB open measurement documentation](//iabtechlab.com/working-groups/open-measurement-working-group/)."]]