Currently COCOS2DX + LUA can dynamically update all of the script files, but cannot dynamically update the CPP part of the code (which is what we call the bottom package), in fact, the same scheme can be implemented in Android dynamic update, Just add a little bit of code to the Java code to load libgame.so.
static {System.loadlibrary ("game"); To move the above code to OnCreate, you might see the following
protected void OnCreate (Bundle savedinstancestate) {File File = new file (Getfilesdir (). GetAbsolutePath () + "/libgame.so"); if (file.exists ()) {System.load (File.getabsolutepath ()); } else {system.loadlibrary ("game"); } super.oncreate (savedinstancestate);}
This way we can update the libgame.so into a writable directory just like the Lua script, and then load the new libgame.so, and there may be some modifications to make sure that the current program does not crash when the libgame.so is modified.
Probably researched, iOS can create a dynamic link library, technically allowed, but the audit app will be rejected, do not allow this way to use, so it may not be able to implement on iOS, such as the dynamic update on Android, but you can think of the broad sense there is no other way, If you have any plan, please share it, thanks a bit.