Gojira

A plugin for Cordova to enable native nativation and loading of web views.
DanyHunter1.0.05
platforms: ios
$ cordova plugin add com.poeticsystems.plugin.gojira

Gojira

Update: I will soon start working on this project again. Multi pages are difficult since you lose the state of your app and it makes it very difficult to handle multi-page apps as one. By refactoring this plugin, the state of the app will be preserved, thus it will be usable with any existing cordova projects.

This is a Cordova Plugin that allows you to create native transitions with JS thus allowing you to create a multi-page application. In Other words - a hybrid application with native navigation. Mind. Blown.

Usage

This starts the plugin. It will immediately replace the current webView with the one passed as the argument. Loads the file from inside the www directory. It is recomended that you do not remove the loading screen cordova provides until you call this.

gojira.launch('someFile.html');

This stacks a new webview into the current navigation controller.

gojira.newView('someFile.html');

This goes back to the previous view.

gojira.back();

This sends a message from one view to another.

gojira.postMessage({data: 'someData'});

Set this function anywhere to intercept an incoming message.

window.message = function(msg) {
  alert('message received!');
  if(msg.data === 'someData') {
    console.log(msg.data);
  }
}

More magic coming soon!