RAGI BURHUM
Mobile Cross-platform
Development in C++
RBURHUM
WHAT IS AMIGOCLOUD
AmigoCloud is a SaaS Enterprise Mapping Platform that is changing
how organizations work with their location data.
https://www.youtube.com/watch?v=lj6OeTZgzM8
DEMO
DATA COLLECTION MOBILE APPLICATION
AMIGOCLOUD: MOBILE CROSS-PLATFORM DEVELOPMENT IN C++
Android iOS
- Map Rendering (OpenGL)
- Data Collection Forms are user-
customizable (through HTML +
JavaScript).
- Intensive Geospatial Operations
- Common Code between all
platforms
a) 95% C++ code
b) 5% platform-specific code
- iOS, Android, OSX, Linux,
Windows
HOW?
AMIGOCLOUD: MOBILE CROSS-PLATFORM DEVELOPMENT IN C++
- No third party framework
- Leverage POSIX
- C++ 11 codebase (e.g. threads, shared pointer types, lambdas, STL)
- GCC or Clang/LLVM
- Webkit
- Custom Build system to handle complexity of compiling (AmigoMake)...
AMIGOCLOUD: MOBILE CROSS-PLATFORM DEVELOPMENT IN C++
Yet another build
system?!?!?
Y U NOT
USE ‘X’
BUILD SYSTEM: AMIGOMAKE
AMIGOCLOUD: MOBILE CROSS-PLATFORM DEVELOPMENT IN C++
a) Open Source – built by us for us.
b) Python based
c) Downloads all external libraries (e.g. freetype, jpeg, sqlite, openssl, libcurl,
etc)
d) Trivial to add more dependencies
e) Builds it for the target system (can generate shared libs, static libs or
executables). Finds all the .c, .cpp, .m, .mm files and the headers and builds
it according to AmigoMakefile
Building dependencies is one of the most complex parts
of pulling this off. We wanted it to be easy.
BUILD SYSTEM: AMIGOMAKE
AMIGOCLOUD: MOBILE CROSS-PLATFORM DEVELOPMENT IN C++
iOS build (with external dependencies)
amigomake --all -a armv7 -a arm64 clean ios -v 8.1
Android build (with external dependencies)
amigomake --all android -n ~/android-ndk/ -v 14
X86 build (with external dependencies)
amigomake --all x86
Generate CMake config (e.g. to use with Intellij/CLion)
amigomake cmake x86
AMIGOCLOUD: MOBILE CROSS-PLATFORM DEVELOPMENT IN C++
HOW DO YOU INTERACT WITH C++ IN iOS
AMIGOCLOUD: MOBILE CROSS-PLATFORM DEVELOPMENT IN C++
- Actually, we use Objective C++. Rename .m to .mm and you are good to
go!
Example of Objective C calling C++ Example of C++ calling Objective-C
HOW DO YOU INTERACT WITH C++ in Android
AMIGOCLOUD: MOBILE CROSS-PLATFORM DEVELOPMENT IN C++
- Java Native Interface (JNI)
Java Class
C++ Function Prototype
C++ Implementation
HOW DO YOU INTERACT WITH WEBKIT AND JAVASCRIPT
AMIGOCLOUD: MOBILE CROSS-PLATFORM DEVELOPMENT IN C++
- Through a bridge (i.e. implement a class in your native language and expose
it to JavaScript)
JavaScript and iOS Bridge (header, implementation)
JavaScript and Android Bridge (implementation)
RAGI BURHUM
PROFESSIONAL MAPPING. REDEFINED
415.935.1447
RAGI@AMIGOCLOUD.COM

Mobile Cross-Platform Development in C++

  • 1.
  • 2.
    WHAT IS AMIGOCLOUD AmigoCloudis a SaaS Enterprise Mapping Platform that is changing how organizations work with their location data.
  • 3.
  • 4.
  • 5.
    DATA COLLECTION MOBILEAPPLICATION AMIGOCLOUD: MOBILE CROSS-PLATFORM DEVELOPMENT IN C++ Android iOS - Map Rendering (OpenGL) - Data Collection Forms are user- customizable (through HTML + JavaScript). - Intensive Geospatial Operations - Common Code between all platforms a) 95% C++ code b) 5% platform-specific code - iOS, Android, OSX, Linux, Windows
  • 6.
    HOW? AMIGOCLOUD: MOBILE CROSS-PLATFORMDEVELOPMENT IN C++ - No third party framework - Leverage POSIX - C++ 11 codebase (e.g. threads, shared pointer types, lambdas, STL) - GCC or Clang/LLVM - Webkit - Custom Build system to handle complexity of compiling (AmigoMake)...
  • 7.
    AMIGOCLOUD: MOBILE CROSS-PLATFORMDEVELOPMENT IN C++ Yet another build system?!?!? Y U NOT USE ‘X’
  • 8.
    BUILD SYSTEM: AMIGOMAKE AMIGOCLOUD:MOBILE CROSS-PLATFORM DEVELOPMENT IN C++ a) Open Source – built by us for us. b) Python based c) Downloads all external libraries (e.g. freetype, jpeg, sqlite, openssl, libcurl, etc) d) Trivial to add more dependencies e) Builds it for the target system (can generate shared libs, static libs or executables). Finds all the .c, .cpp, .m, .mm files and the headers and builds it according to AmigoMakefile Building dependencies is one of the most complex parts of pulling this off. We wanted it to be easy.
  • 9.
    BUILD SYSTEM: AMIGOMAKE AMIGOCLOUD:MOBILE CROSS-PLATFORM DEVELOPMENT IN C++ iOS build (with external dependencies) amigomake --all -a armv7 -a arm64 clean ios -v 8.1 Android build (with external dependencies) amigomake --all android -n ~/android-ndk/ -v 14 X86 build (with external dependencies) amigomake --all x86 Generate CMake config (e.g. to use with Intellij/CLion) amigomake cmake x86
  • 10.
  • 11.
    HOW DO YOUINTERACT WITH C++ IN iOS AMIGOCLOUD: MOBILE CROSS-PLATFORM DEVELOPMENT IN C++ - Actually, we use Objective C++. Rename .m to .mm and you are good to go! Example of Objective C calling C++ Example of C++ calling Objective-C
  • 12.
    HOW DO YOUINTERACT WITH C++ in Android AMIGOCLOUD: MOBILE CROSS-PLATFORM DEVELOPMENT IN C++ - Java Native Interface (JNI) Java Class C++ Function Prototype C++ Implementation
  • 13.
    HOW DO YOUINTERACT WITH WEBKIT AND JAVASCRIPT AMIGOCLOUD: MOBILE CROSS-PLATFORM DEVELOPMENT IN C++ - Through a bridge (i.e. implement a class in your native language and expose it to JavaScript) JavaScript and iOS Bridge (header, implementation) JavaScript and Android Bridge (implementation)
  • 14.
    RAGI BURHUM PROFESSIONAL MAPPING.REDEFINED 415.935.1447 RAGI@AMIGOCLOUD.COM