PluginAdapterProtocol
@objc
public protocol PluginAdapterProtocol : NSObjectProtocol
Base Zapp Plugin protocol
-
Initialize with plugin model
Declaration
Swift
init(pluginModel: ZPPluginModel)
Parameters
pluginModel
Dictionary with configuration params that passed from ZPPluginModel
-
Zapp Plugin Model
Declaration
Swift
var model: ZPPluginModel? { get }
-
Readable name of the plugin
Declaration
Swift
var providerName: String { get }
-
Invocation of this function must prepare push notification plugin for use.
Attention
Application will wait completion of this func to present application. Completion must be called as soon as possibleDeclaration
Swift
func prepareProvider(_ defaultParams: [String : Any], completion: ((_ isReady: Bool) -> Void)?)
Parameters
defaultParams
default parameters of the plugin
completion
Completion handler that notify app level that component ready to be presented or fail
-
Notify plugin that plugin must be disabled
Note
On this stop plugin must stop any activity, remove observers, stop load data and etcDeclaration
Swift
func disable(completion: ((_ success: Bool) -> Void)?)
Parameters
completion
Notify application that plugin has been disable