No duplication for important bussiness logic. • Several sets of eyes on the same code. • Platform independence “for free” - compiles on iOS, Android, Linux, OS X and Windows. • Significant time savings in the development process.
TYPE ARM5/6** ARM7 ARM8 X86 X86_64 MIPS*** armeabi ✓ ✓ ✓ ✓ ✓ armeabi-v7a ✓ ✓ ✓* ✓ arm64-v8a ✓ x86 ✓ ✓ x86_64 ✓ mips ✓ * via libhoudini, slower and potentially buggy ** obsolete architecture, not used anymore *** no known consumer devices
C++ main logic Android glue Android UI Java APIs Linux CLI Windows CLI ObjC APIs iOS Mac Unit tests Instrumentation tests iOS tests C++ GTest unit tests
No good support at all - XCode Instruments still the best tool. • nVidia Tegra Profiler is the only working one - needs a (rooted) Tegra device. https://developer.nvidia.com/tegra-system-profiler
don’ts! • DON’T link against system libraries. • DON’T rely on C++ UTF implementation - use miniUTF or platform APIs. • DO offload heavy dependencies (regex, charsets, crypto) to platform libraries. • DO be conservative with dependencies - “smart” libraries will break. • DO link everyting in a single static .so library. Dynamic linking is full of issues on Android.