MiniAppNavigationDelegate
public protocol MiniAppNavigationDelegate : AnyObject
A delegate used by Mini App view to communicate about available actions based on current user interactions on the Mini App
-
miniAppNavigation(shouldOpen:Default implementationwith: onClose: ) This delegate method is called when an external URL is tapped into a Mini App so you can display your own webview to load the url parameter, for example. A
MiniAppNavigationResponseHandleris also provided so you can give a proper feedback to your MiniApp under the form of an URL when you wantDefault Implementation
Declaration
Swift
func miniAppNavigation(shouldOpen url: URL, with responseHandler: @escaping MiniAppNavigationResponseHandler, onClose closeHandler: MiniAppNavigationResponseHandler?)Parameters
urlthe external URL triggered from the MiniApp
responseHandlera
MiniAppNavigationResponseHandlerused to provide an URL to the Mini App -
miniAppNavigation(shouldOpen:Default implementationwith: onClose: customMiniAppURL: ) This delegate method is called when an external URL is tapped into a url loaded Mini App so you can display your own webview to load the url parameter, for example. A
MiniAppNavigationResponseHandleris also provided so you can give a proper feedback to your MiniApp under the form of an URL when you want. This should only be used for previewing a mini app from a local server.Default Implementation
Declaration
Swift
func miniAppNavigation(shouldOpen url: URL, with responseHandler: @escaping MiniAppNavigationResponseHandler, onClose closeHandler: MiniAppNavigationResponseHandler?, customMiniAppURL: URL)Parameters
urlthe external URL triggered from the MiniApp
responseHandlera
MiniAppNavigationResponseHandlerused to provide an URL to the Mini AppcustomMiniAppURLThe url that was used to load the Mini App.
-
miniAppNavigation(canUse:Default implementation) This delegate method is called when a navigation is performed inside the Mini App.
Default Implementation
Declaration
Swift
func miniAppNavigation(canUse actions: [MiniAppNavigationAction])Parameters
actionsa list of
MiniAppNavigationActionthat can be used to navigate inside the Mini App -
miniAppNavigation(delegate:Default implementation) This delegate method is called when a Mini App view is created.
Default Implementation
Declaration
Swift
func miniAppNavigation(delegate: MiniAppNavigationBarDelegate)Parameters
delegatea
MiniAppNavigationBarDelegatethe can be used to callMiniAppNavigationActionon the Mini App view -
miniAppNavigationCanGo(back:Default implementationforward: ) This delegate is called whenever any page is routed and it tells whether the webview canGoBack or canGoForward
Default Implementation
Declaration
Swift
func miniAppNavigationCanGo(back: Bool, forward: Bool)Parameters
backTrue if WebView can go back
forwardTrue if WebView can go forward
-
checkWebsiteSecurity(url:Extension methodwith: ) Undocumented
Declaration
Swift
func checkWebsiteSecurity(url: URL, with responseHandler: @escaping (Bool) -> Void)
MiniAppNavigationDelegate Protocol Reference