AI-generated Key Takeaways
-
IMALinkOpenerDelegate
protocol signals the opening and closing of links, including external applications and in-app links. -
For external applications like Safari or deep links, the delegate is notified only before opening via the
linkOpenerWillOpenExternalApplication:
method. -
For in-app links, the delegate receives notifications before opening, after opening, before closing, and after closing, providing comprehensive tracking through
linkOpenerWillOpenInAppLink:
,linkOpenerDidOpenInAppLink:
,linkOpenerWillCloseInAppLink:
, andlinkOpenerDidCloseInAppLink:
methods respectively. -
All delegate methods are optional and receive the
linkOpener
object as a parameter, representing the object initiating the link interaction.
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;
Parameters
linkOpener
the receiving object
-
Called before in-app browser/app store opens.
Declaration
Swift
optional func linkOpenerWillOpen(inAppLink linkOpener: NSObject)
Objective-C
- (void)linkOpenerWillOpenInAppLink:(nonnull NSObject *)linkOpener;
Parameters
linkOpener
the receiving object.
-
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;
Parameters
linkOpener
the receiving object
-
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;
Parameters
linkOpener
the receiving object
-
Called when in-app browser/app-store finishes closing.
Declaration
Swift
optional func linkOpenerDidClose(inAppLink linkOpener: NSObject)
Objective-C
- (void)linkOpenerDidCloseInAppLink:(nonnull NSObject *)linkOpener;
Parameters
linkOpener
the receiving object