Crossplatform iPhone / Android code sharing

前端 未结 11 1544
北海茫月
北海茫月 2020-12-01 01:51

Simply put: What is the most effective way to share / reuse code between iPhone and Android builds?

The two most common scenarios I think would be:

  1. Bla
11条回答
  •  悲&欢浪女
    2020-12-01 02:25

    In my experience, you can use Android NDK to compile C and C++ , so if you use iPhone Obj-C++ (.mm) bindings for a C++/C engine in the iPhone, and in Android you use Java bindings to the same engine, It should be totally possible.

    So C++/C engine ( almost same codebase for Android and iPhone ) + Thin bindings layer = Portable code.

提交回复
热议问题