I need to update because of the app crash

In the past, I launched a game using the cocos2d-x 3.8.1 version.

This app is still on the App Store.

But I see a lot of reviews that the app suddenly ends while running.

So I think I need to update the app, which version of Cocos2d-x should I update? Is 3.17.2 good? Or is 4.0 better?

And what is the fastest way to update the engine?

For iOS or Mac you have to use cocos2d-x 4.0 and for android 3.17.2 is best

Thank you very much for your answer.

My game needs to support both iOS and Android.

Should I use version 3.17.2 then?
Can’t the 3.17.2 version support two platforms (ios, Android)?

yes, you can use 3.17.2 for both ios and android but it is recommended that you use 4.0 for ios and 3.17.2 for android.

Use of v3.17.2 is not recommended as it will be rejected by the iOS review process.
This is because it uses UIWebView internally.
It must be modified to WKWebView.

The latest version of v3 available from github has this fix, so using the latest version of v3 will support both iOS and Android.

If you have the git and python commands ready, you can get the latest version of v3.
You will be working on the command line.

As a preliminary step, run the following command

$ git config --global url."https://".insteadOf git://

You will need python 2.x.
The environment I tested is CentOS8, so the command name is python2.

$ python2 -V
Python 2.7.18

Now all you have to do is run the commands in order.

git clone https://github.com/cocos2d/cocos2d-x.git
cd cocos2d-x/
git checkout v3
python2 download-deps.py
git submodule update --init
cd tools/cocos2d-console/
python2 download-bin.py

Thank you very much for your answer. I proceeded as you told me.

But in the final instruction(python2 download-bin.py) following error occurred.

==> Preparing to download console binaries!
==> version file doesn't exist
==> Ready to download 'v3-console-16.zip' from 'https://github.com/cocos2d/console-binary/archive/v3-console-16.zip'
Traceback (most recent call last):
  File "download-bin.py", line 301, in <module>
  File "download-bin.py", line 296, in main
    installer.run("", opts.remove_downloaded, opts.force_update, opts.download_only)
  File "download-bin.py", line 241, in run
  File "download-bin.py", line 203, in download_zip_file
  File "download-bin.py", line 91, in download_file
    u = urllib2.urlopen(self._url)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1241, in https_open
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1198, in do_open
    raise URLError(err)
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>

I don’t know if this is done properly.

I have one more question.

Can’t version 4.0 support two platforms? Does version 4.0 support Android?

I wonder why you don’t recommend 4.0 for Android.

Of course, v4 can support iOS and Android.
The reason I recommended v3 is simply because I have never used v4.
I cannot recommend something I am not using.

I am currently using v3 and have a track record of updating the app on iOS and Android just a few days ago.
The reason I am still using v3 is simple.
I have not been able to migrate because the 3rd party libraries I use are not yet compatible with 4.0.

I share the latest version of the v3 zip file created in my environment on Google Drive.
You can use it if you like.

Probably best to use v4, but as already mentioned I have no experience with v4 yet.

Thank you very much for your reply.Thank you beyond words.

Can I ask you one more question?

How do I update the cocos2d-x engine of the my project?

The method I used is as follows.

I replaced the cocos2d folder of my project with the folder you gave me.

After that, I cleaned and built the xcode.

Doing so resulted in the following error:

[‘Box2D/Box2D.h’ file not found]

What did I do wrong?

I did not notice that error because I do not use Box2D.
The Box2D folder is located at


Since the path to cocos2d/cocos is supposed to be included in the include search path
You may be able to include it with a modification like this.

#include "../external/Box2D/Box2D.h"

Or, modify the XCode configuration to add cocos2d/external to the include search path.
That’s all the ideas I have for now.

I don’t think crash has a relation with updating your engine.
Problem is likely at your end.

You can access the crash log from xcode->organiser->crashes-> select version.
This can help you solve the bug.

Thank you very much for your reply.

Thank you very much for your reply