MiniAppViewable
public protocol MiniAppViewable : UIView, MiniAppNavigationBarDelegate
Public protocol for MiniAppView
-
The state of the MiniApp (eg. loading, active, error)
Declaration
Swift
var state: PassthroughSubject<MiniAppViewState, Never> { get }
-
ProgressView that can be displayed on top of MiniAppView When using the
UI
moduleMiniAppProgressView
can be used as defaultDeclaration
Swift
var progressStateView: MiniAppProgressViewable? { get set }
-
load(fromCache:
Default implementationcompletion: ) Loads the MiniApp (getInfo, download etc) and initialized the webview. After load is complete it will display the loaded MiniApp or an error.
Default Implementation
Declaration
Swift
func load(fromCache: Bool, completion: @escaping ((Result<Bool, MASDKError>) -> Void))
Parameters
fromCache
Load the MiniApp from Cache (default is false)
completion
Completes with an optional MiniAppWebView that will be added onto the View or throws an MASDKError
-
loadAsync(fromCache:
Default implementation, asynchronous) Loads the MiniApp async (getInfo, download etc) and initialized the webview After load is complete it will display the loaded MiniApp or an error.
Default Implementation
Declaration
Swift
@discardableResult func loadAsync(fromCache: Bool) async throws -> MiniAppView.MiniAppLoadStatus
Parameters
fromCache
Load the MiniApp from Cache (default is false)
Return Value
The MiniAppLoadStatus which indicates
loadAsync
was sucessful -
Alert Info when closing the MiniApp
Declaration
Swift
var alertInfo: CloseAlertInfo? { get }
-
Undocumented
Declaration
Swift
var enable3DTouch: Bool { get }
-
loadFromBundle(miniAppManifest:
Default implementationcompletion: ) Undocumented
Default Implementation
Undocumented
Declaration
Swift
func loadFromBundle(miniAppManifest: MiniAppManifest?, completion: @escaping ((Result<Bool, MASDKError>) -> Void))