# RIP cocoon JS. Hello \_\_\_\_\_\_

**URL:** <https://phaser.discourse.group/t/rip-cocoon-js-hello/1194>\
**Category:** Phaser 3\
**Created:** [February 12, 2019, 8:39pm UTC](https://phaser.discourse.group/t/rip-cocoon-js-hello/1194 "2019-02-12T20:39:28Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/dan/32/715_2.png) [@dan](https://phaser.discourse.group/u/dan)\
**Post date:** [February 12, 2019, 8:39pm UTC](https://phaser.discourse.group/t/rip-cocoon-js-hello/1194/1 "2019-02-12T20:39:28Z")

</div>

Hi everybody. I’m Dan from team Gamefroot. I’m new to these forums but hopefully you’ll see more of me as me and my team start working with Phaser more and more 🙂

My message is about Cocoon JS and mobile wrappers. I was not surprised to see Cocoon JS shut down but pretty sad that it did.

In their absence I am wondering whether the Phaser community has had any thoughts or has plans to support a specific mobile wrapper going forward. I’ve seen people talking about Capacitor and Phone Gap but are there any examples of games running performant using these wrappers.

Any thoughts / reassurances on publishing to iOS / Android (and beyond) would be awesome.

---

<div class="post-metadata">

**Author:** ![prob](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/prob/32/628_2.png) [@prob](https://phaser.discourse.group/u/prob)\
**Post date:** [February 12, 2019, 9:16pm UTC](https://phaser.discourse.group/t/rip-cocoon-js-hello/1194/2 "2019-02-12T21:16:51Z")

</div>

Cocoon JS was just a (paid) automated cloud based build service for Cordova (free), which is still alive and well.

---

<div class="post-metadata">

**Author:** ![dan](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/dan/32/715_2.png) [@dan](https://phaser.discourse.group/u/dan)\
**Post date:** [February 12, 2019, 9:41pm UTC](https://phaser.discourse.group/t/rip-cocoon-js-hello/1194/3 "2019-02-12T21:41:07Z")

</div>

I don’t think ‘just’ is ‘justified’. They were a very useful Cloud based service.

They were way more than just a Cordova service. Their compilation process made games run way more performant. Anyway this isnt helpful 😛

Does anybody know of anything that matches the performance of Cocoon?

Does / will Capacitor do this?

---

<div class="post-metadata">

**Author:** ![prob](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/prob/32/628_2.png) [@prob](https://phaser.discourse.group/u/prob)\
**Post date:** [February 12, 2019, 10:00pm UTC](https://phaser.discourse.group/t/rip-cocoon-js-hello/1194/4 "2019-02-12T22:00:25Z")

</div>

I meant “just” in the sense that the same platform (Cordova) is still around, either with the CLI or other free/paid services. In my experience Cocoon’s Canvas+ performance was comparable to Cordova with WKWebview.

---

<div class="post-metadata">

**Author:** ![yannick](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/yannick/32/732_2.png) [@yannick](https://phaser.discourse.group/u/yannick)\
**Post date:** [February 12, 2019, 11:16pm UTC](https://phaser.discourse.group/t/rip-cocoon-js-hello/1194/5 "2019-02-12T23:16:01Z")

</div>

From my experience:

Both PhoneGap and Cocoon are based on Cordova.

At the time (2 years ago), the fastest for Phaser 2 games was Cordova/PhoneGap with the Crosswalk Project (custom WebView) or Coccon with the Canvas+ WebView.  
It was necessary to use a custom WebView, since Phaser Games did not work well on all mobile phone with their default WebView. Also I used Phaser.CANVAS to render all my games, since it worked faster than WEBGL.

Nowadays, the default webview on all phones (iOS and Android) are very good. Phaser 3 games work out of the box very fast on all devices. Also the [support for WEBGL](https://webglstats.com/) is now much better.

So today I use [PhoneGap](https://build.phonegap.com/) (Phaser.AUTO) with no additional webview.  
No need for a custom webview, since the defaults are very good.  
And you can not use Cocoons Canvas+ if you render the game with WEBGL.

Capacitor is something different, although you can use Cordova plugins with it. Theoretically the performance should be equivalent with PhoneGap.

Hope this helps. It works very well for me.

---

<div class="post-metadata">

**Author:** ![lapamplemousse](https://avatars.discourse-cdn.com/v4/letter/l/6a8cbe/32.png) [@lapamplemousse](https://phaser.discourse.group/u/lapamplemousse)\
**Post date:** [June 13, 2019, 8:42am UTC](https://phaser.discourse.group/t/rip-cocoon-js-hello/1194/6 "2019-06-13T08:42:45Z")

</div>

Hi Yannick, I have an android studio application which I want to add some Phaser 3 games too. The application is made in android studio. Would phonegap be a good solution to convert my HTML5 games to android??

Where I am confused is whether phonegap can be used within another android studio project, or does phonegap create the infrastructure for a solely independent application?

From your response I am guessing it will work fine, as you mention using a webView. I assume this means connecting a webview to the index.html file stored in your android assets?!

Any help to this new android game developer would be of great help!

---

<div class="post-metadata">

**Author:** ![yannick](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/yannick/32/732_2.png) [@yannick](https://phaser.discourse.group/u/yannick)\
**Post date:** [June 22, 2019, 12:42pm UTC](https://phaser.discourse.group/t/rip-cocoon-js-hello/1194/7 "2019-06-22T12:42:04Z")

</div>

_Sorry for the late answer. Was offline for a while._

> [@lapamplemousse](#):
>
> Would phonegap be a good solution to convert my HTML5 games to android?

I guess, yes. But only if you do not have much custom java code. PhoneGap kina does all for you and it is not that easy to add custom java code.

> [@lapamplemousse](#):
>
> Where I am confused is whether phonegap can be used within another android studio project, or does phonegap create the infrastructure for a solely independent application?

I have never used a PhoneGap project with android studio. I think it is not (easily) possible. PhoneGap simply takes your html code and wrappes it.

Maybe you want to use [capacitor](https://capacitor.ionicframework.com/) instead?

* * *

In summary. If you only have some html and js, I would use PhoneGap/Cordova. If you have to add some custom java code, try capacitor.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![RollinSafary](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/rollinsafary/32/2159_2.png) [@RollinSafary](https://phaser.discourse.group/u/RollinSafary)\
**Post date:** [November 7, 2019, 10:47pm UTC](https://phaser.discourse.group/t/rip-cocoon-js-hello/1194/8 "2019-11-07T22:47:51Z")

</div>

I’m using cordova and planning to make some plugins in future.  
Even if one day cordova will decide to die. I’m planning to make something like it for just android and ios. So I think we won’t have any problems with porting games to native webviews.

---

<div class="post-metadata">

**Author:** ![dan](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/dan/32/715_2.png) [@dan](https://phaser.discourse.group/u/dan)\
**Post date:** [November 7, 2019, 11:02pm UTC](https://phaser.discourse.group/t/rip-cocoon-js-hello/1194/9 "2019-11-07T23:02:58Z")

</div>

It’s hard to imagine Cordova dying. Have you launched any games with it?

Always keen to learn how things are working out for others 🙂

---

<div class="post-metadata">

**Author:** ![RollinSafary](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/rollinsafary/32/2159_2.png) [@RollinSafary](https://phaser.discourse.group/u/RollinSafary)\
**Post date:** [November 7, 2019, 11:51pm UTC](https://phaser.discourse.group/t/rip-cocoon-js-hello/1194/10 "2019-11-07T23:51:14Z")

</div>

One little card game was launched without any problems. But another one has some problems with ios webview. The main issue is that after playing game over 2 minutes phone starts burning. As we found out, it’s result of socket cluster that is being used in project. On Android devices everything is just fine.

---

<div class="post-metadata">

**Author:** ![yannick](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/yannick/32/732_2.png) [@yannick](https://phaser.discourse.group/u/yannick)\
**Post date:** [May 13, 2022, 9:54am UTC](https://phaser.discourse.group/t/rip-cocoon-js-hello/1194/11 "2022-05-13T09:54:50Z")

</div>

Please have a look at:

> [@Convert your Phaser game to a native mobile app online](https://phaser.discourse.group/t/convert-your-phaser-game-to-a-native-mobile-app-online/11691):
>
> Hi, In the past, I was using Intel XDK, PhoneGap Build, and Cocoonjs to build a native app. But now, all these 3 solutions are gone. Nowadays, you have to choose between [Capacitor](https://capacitorjs.com/) and [Cordova](https://cordova.apache.org/). Cordova is easy to use, as it just needs one config.xml file. Capacitor is more modern, but you have to deal with, at least some, native code. Why not combine the simplicity of Cordova’s config.xml and the modern Capacitor into one package that compiles in the cloud? Well, that’s what I’m about to d…
