GoogleInteractiveMediaAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
IMALinkOpenerDelegate
@protocol IMALinkOpenerDelegate <NSObject>
Signals that a link has been opened/closed.
For an external app (Mobile Safari/App deep link), the delegate is only notified
before opening.
-
Called when Safari or app deep link is about to be opened.
Declaration
Swift
optional func linkOpenerWillOpenExternalApplication(_ linkOpener: NSObject)
Objective-C
- (void)linkOpenerWillOpenExternalApplication:(nonnull NSObject *)linkOpener;
-
Called before in-app browser/app store opens.
Declaration
Swift
optional func linkOpenerWillOpen(inAppLink linkOpener: NSObject)
Objective-C
- (void)linkOpenerWillOpenInAppLink:(nonnull NSObject *)linkOpener;
-
Called when the in app browser/app-store is shown on the screen.
Declaration
Swift
optional func linkOpenerDidOpen(inAppLink linkOpener: NSObject)
Objective-C
- (void)linkOpenerDidOpenInAppLink:(nonnull NSObject *)linkOpener;
-
Called when in-app browser/app-store is about to close.
Declaration
Swift
optional func linkOpenerWillClose(inAppLink linkOpener: NSObject)
Objective-C
- (void)linkOpenerWillCloseInAppLink:(nonnull NSObject *)linkOpener;
-
Called when in-app browser/app-store finishes closing.
Declaration
Swift
optional func linkOpenerDidClose(inAppLink linkOpener: NSObject)
Objective-C
- (void)linkOpenerDidCloseInAppLink:(nonnull NSObject *)linkOpener;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eIMALinkOpenerDelegate\u003c/code\u003e protocol signals link open/close events for external apps (Mobile Safari/App deep link) and in-app content (browser/app store).\u003c/p\u003e\n"],["\u003cp\u003eDelegate methods are called before and after opening/closing links in both external apps and in-app contexts.\u003c/p\u003e\n"],["\u003cp\u003eFor external apps, the delegate is notified only before opening; for in-app links, notifications are provided before, during, and after opening/closing.\u003c/p\u003e\n"],["\u003cp\u003eAll delegate methods are optional and receive the \u003ccode\u003elinkOpener\u003c/code\u003e object as a parameter, representing the object handling the link opening process.\u003c/p\u003e\n"]]],["The `IMALinkOpenerDelegate` protocol signals link actions. It notifies before opening external apps (Safari/deep links) via `linkOpenerWillOpenExternalApplication`. For in-app links, it signals before opening with `linkOpenerWillOpenInAppLink`, after opening with `linkOpenerDidOpenInAppLink`, before closing via `linkOpenerWillCloseInAppLink`, and after closing via `linkOpenerDidCloseInAppLink`. The linkOpener, which represents the receiving object, is provided as a parameter.\n"],null,["# GoogleInteractiveMediaAds Framework Reference\n\nIMALinkOpenerDelegate\n=====================\n\n @protocol IMALinkOpenerDelegate \u003cNSObject\u003e\n\nSignals that a link has been opened/closed.\nFor an external app (Mobile Safari/App deep link), the delegate is only notified\nbefore opening.\n- `\n ``\n ``\n `\n\n ### [-linkOpenerWillOpenExternalApplication:](#/c:objc(pl)IMALinkOpenerDelegate(im)linkOpenerWillOpenExternalApplication:)\n\n `\n ` \n Called when Safari or app deep link is about to be opened. \n\n #### Declaration\n\n Swift \n\n optional func linkOpenerWillOpenExternalApplication(_ linkOpener: NSObject)\n\n Objective-C \n\n - (void)linkOpenerWillOpenExternalApplication:(nonnull NSObject *)linkOpener;\n\n #### Parameters\n\n |--------------------|----------------------|\n | ` `*linkOpener*` ` | the receiving object |\n\n- `\n ``\n ``\n `\n\n ### [-linkOpenerWillOpenInAppLink:](#/c:objc(pl)IMALinkOpenerDelegate(im)linkOpenerWillOpenInAppLink:)\n\n `\n ` \n Called before in-app browser/app store opens. \n\n #### Declaration\n\n Swift \n\n optional func linkOpenerWillOpen(inAppLink linkOpener: NSObject)\n\n Objective-C \n\n - (void)linkOpenerWillOpenInAppLink:(nonnull NSObject *)linkOpener;\n\n #### Parameters\n\n |--------------------|-----------------------|\n | ` `*linkOpener*` ` | the receiving object. |\n\n- `\n ``\n ``\n `\n\n ### [-linkOpenerDidOpenInAppLink:](#/c:objc(pl)IMALinkOpenerDelegate(im)linkOpenerDidOpenInAppLink:)\n\n `\n ` \n Called when the in app browser/app-store is shown on the screen. \n\n #### Declaration\n\n Swift \n\n optional func linkOpenerDidOpen(inAppLink linkOpener: NSObject)\n\n Objective-C \n\n - (void)linkOpenerDidOpenInAppLink:(nonnull NSObject *)linkOpener;\n\n #### Parameters\n\n |--------------------|----------------------|\n | ` `*linkOpener*` ` | the receiving object |\n\n- `\n ``\n ``\n `\n\n ### [-linkOpenerWillCloseInAppLink:](#/c:objc(pl)IMALinkOpenerDelegate(im)linkOpenerWillCloseInAppLink:)\n\n `\n ` \n Called when in-app browser/app-store is about to close. \n\n #### Declaration\n\n Swift \n\n optional func linkOpenerWillClose(inAppLink linkOpener: NSObject)\n\n Objective-C \n\n - (void)linkOpenerWillCloseInAppLink:(nonnull NSObject *)linkOpener;\n\n #### Parameters\n\n |--------------------|----------------------|\n | ` `*linkOpener*` ` | the receiving object |\n\n- `\n ``\n ``\n `\n\n ### [-linkOpenerDidCloseInAppLink:](#/c:objc(pl)IMALinkOpenerDelegate(im)linkOpenerDidCloseInAppLink:)\n\n `\n ` \n Called when in-app browser/app-store finishes closing. \n\n #### Declaration\n\n Swift \n\n optional func linkOpenerDidClose(inAppLink linkOpener: NSObject)\n\n Objective-C \n\n - (void)linkOpenerDidCloseInAppLink:(nonnull NSObject *)linkOpener;\n\n #### Parameters\n\n |--------------------|----------------------|\n | ` `*linkOpener*` ` | the receiving object |"]]