diff --git a/platforms/ios/HelloCordova/Plugins/WizCanvasPlugin/WizCanvasPlugin.m b/platforms/ios/HelloCordova/Plugins/WizCanvasPlugin/WizCanvasPlugin.m index cbe1e9b..0cb212b 100644 --- a/platforms/ios/HelloCordova/Plugins/WizCanvasPlugin/WizCanvasPlugin.m +++ b/platforms/ios/HelloCordova/Plugins/WizCanvasPlugin/WizCanvasPlugin.m @@ -114,6 +114,9 @@ - (void)createView:(CDVInvokedUrlCommand *)command { //WizCanvasView *canvas = [[WizCanvasView alloc] initWithWindow:canvasView name:viewName sourceToLoad:src]; WizCanvasView *canvas = [[WizCanvasView alloc] initWithFrame:newRect]; + // Boot canvasViewMessenger in Ejecta + [canvas evaluateScript:[NSString stringWithFormat:@"wizCanvasMessenger = new Ejecta.WizCanvasMessenger(\"%@\");", viewName]]; + // Additional boot file if (![src isEqualToString:@""]) { if ([self validateUrl:src]) { diff --git a/platforms/ios/HelloCordova/Plugins/WizCanvasPlugin/WizCanvasView.m b/platforms/ios/HelloCordova/Plugins/WizCanvasPlugin/WizCanvasView.m index 18c5893..0ceed04 100644 --- a/platforms/ios/HelloCordova/Plugins/WizCanvasPlugin/WizCanvasView.m +++ b/platforms/ios/HelloCordova/Plugins/WizCanvasPlugin/WizCanvasView.m @@ -106,9 +106,6 @@ - (id)initWithFrame:(CGRect)frame appFolder:(NSString *)folder { // Load the initial JavaScript source files [self loadScriptAtPath:EJECTA_BOOT_JS]; - - // Load wizViewMessenger - [self evaluateScript:[NSString stringWithFormat:@"wizCanvasMessenger = new Ejecta.WizCanvasMessenger(\"%@\");", @"newCanvas"]]; } return self; } diff --git a/plugin.xml b/plugin.xml index cabfadb..f516bed 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="2.0.1"> Wizard Canvas Plugin