AI-generated Key Takeaways
-
The
IMALinkOpenerDelegate
protocol signals the opening and closing of links, including external applications and in-app links. -
For external applications like Mobile Safari or app deep links, the delegate is only notified before opening via
linkOpenerWillOpenExternalApplication:
. -
For in-app links, the delegate receives notifications for opening (
linkOpenerWillOpenInAppLink:
andlinkOpenerDidOpenInAppLink:
), closing (linkOpenerWillCloseInAppLink:
andlinkOpenerDidCloseInAppLink:
). -
All delegate methods are optional and provide the receiving
linkOpener
object as a parameter.
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