diff --git a/Caravel.podspec b/Caravel.podspec index b544072..8730b9c 100644 --- a/Caravel.podspec +++ b/Caravel.podspec @@ -15,7 +15,7 @@ Pod::Spec.new do |s| # summary should be tweet-length, and the description more in depth. # - version = "1.1.0-beta" + version = "1.1.0" s.name = "Caravel" s.version = version diff --git a/README.md b/README.md index 8493a44..52e64cc 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ class MyController: UIViewController { ## Porting your app from Drekkar to Caravel -Super duper easy. Just use the same codebase and add this after having loaded the Caravel script: +Super duper easy. Just use the same codebase and use the JS script from Caravel. Finally, add this after having loaded the Caravel script: ```javascript var Drekkar = Caravel; diff --git a/caravel/js/Gruntfile.js b/caravel/js/Gruntfile.js index 11bf9f3..64f4f08 100644 --- a/caravel/js/Gruntfile.js +++ b/caravel/js/Gruntfile.js @@ -1,7 +1,7 @@ module.exports = function (grunt) { 'use strict'; - var version = '1.1.0-beta'; + var version = '1.1.0'; // Project configuration grunt.initConfig({ diff --git a/caravel/js/caravel.min.js b/caravel/js/caravel.min.js index a865f76..ee05947 100644 --- a/caravel/js/caravel.min.js +++ b/caravel/js/caravel.min.js @@ -1,2 +1,2 @@ -/** Caravel 1.1.0-beta - https://github.com/coshx/caravel */ +/** Caravel 1.1.0 - https://github.com/coshx/caravel */ var Caravel;Caravel=function(){function Caravel(name){this.name=name,this.subscribers=[],this.isUsingWKWebView=null!=window.webkit&&null!=window.webkit.messageHandlers&&null!=window.webkit.messageHandlers.caravel}return Caravel["default"]=null,Caravel.buses=[],Caravel.prototype._post=function(eventName,data){var body;return this.isUsingWKWebView?(body={busName:this.name,eventName:eventName,eventData:data},setTimeout(function(_this){return function(){return window.webkit.messageHandlers.caravel.postMessage(body)}}(this),0)):setTimeout(function(_this){return function(){var iframe,src;return iframe=document.createElement("iframe"),src="caravel://host.com?busName="+encodeURIComponent(_this.name)+"&eventName="+encodeURIComponent(eventName),null!=data&&(src+=data instanceof Array||data instanceof Object?"&eventData="+encodeURIComponent(JSON.stringify(data)):"&eventData="+encodeURIComponent(data)),iframe.setAttribute("src",src),document.documentElement.appendChild(iframe),iframe.parentNode.removeChild(iframe)}}(this),0)},Caravel.prototype.getName=function(){return this.name},Caravel.prototype.post=function(name,data){return this._post(name,data)},Caravel.prototype.register=function(name,callback){return this.subscribers.push({name:name,callback:callback})},Caravel.prototype.raise=function(name,data){var e,i,len,parsedData,ref,results;for(parsedData=null,parsedData=data instanceof Array||data instanceof Object||"string"==typeof data||data instanceof String?data:JSON.parse(data),ref=this.subscribers,results=[],i=0,len=ref.length;len>i;i++)e=ref[i],e.name===name?results.push(e.callback(name,parsedData)):results.push(void 0);return results},Caravel.getDefault=function(){return null==Caravel["default"]&&(Caravel["default"]=new Caravel("default"),Caravel["default"].post("CaravelInit")),Caravel["default"]},Caravel.get=function(name){var b,i,len,ref;for(ref=Caravel.buses,i=0,len=ref.length;len>i;i++)if(b=ref[i],b.getName()===name)return b;return b=new Caravel(name),Caravel.buses.push(b),b.post("CaravelInit"),b},Caravel}(); \ No newline at end of file