cortex.cpp icon indicating copy to clipboard operation
cortex.cpp copied to clipboard

epic: Cortex supports Android and iOS build options

Open vansangpfiev opened this issue 9 months ago • 1 comments

Goal

  • Extend the existing C++ application to support Android and iOS platforms while maintaining code reusability across all platforms.

Success Criteria

  • The app runs successfully on Android and iOS devices/emulators without errors.
  • Core logic and business rules are shared across all platforms using C++.

Tasklist

  • [ ] Install necessary tools and SDKs for cross-platform development (e.g., Visual Studio Mobile Development workload, Android NDK, Xcode).
  • [ ] Set up project structure to separate platform-specific code from shared C++ code.
  • [ ] Configure Android build environment with JNI integration for accessing C++ code.
  • [ ] Configure iOS build environment with Objective-C++ for integrating C++ code.
  • [ ] Test shared C++ libraries/executions on both platforms to ensure compatibility.
  • [ ] Debug and optimize the application using emulators and devices for both Android and iOS.
  • [ ] Document the development process and update build instructions for future maintenance.

vansangpfiev avatar Apr 10 '25 02:04 vansangpfiev

Steps to build cortex for android:

  • NDK: https://developer.android.com/ndk/downloads
  • Configure cortex and build
# In /engine
mkdir builld && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-android -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=28 -DCMAKE_ANDROID_ARCH_ABI=x86_64 -DCMAKE_ANDROID_NDK=/path/to/android-ndk
make -j4

Ref: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-android-with-the-ndk

vansangpfiev avatar Apr 10 '25 03:04 vansangpfiev

deprecate

freelerobot avatar Jun 24 '25 02:06 freelerobot