Skip to content
Sample Projects to demonstrate how to build Android apps with Swift.
Swift Java Ruby Makefile C++
Branch: master
Clone or download
Latest commit a6e3cc2 Aug 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Android Added CA Certificates to APK assets. Aug 11, 2019
Package
Scripts Updated compiler settings to fit recent changes in Swift. Aug 18, 2019
iOS
.gitignore
.rubocop.yml
CHANGELOG
LICENSE.txt
Readme.md
VERSION
local.properties.yml.template Build script moved to Scripts folder. Aug 10, 2019

Readme.md

Requirements

  • Xcode 11
  • Android Studio 3.4
  • Android NDK 20 (Comes with Android Studio as downloadable package).
  • Ruby 2.5 (Comes with macOS)

Usage

  1. Make sure that you have Swift Android Toolchain. You can either build it or download pre-build version.

  2. Make sure that file Android/local.properties has proper paths (usually paths already set by Android Studio):

    • sdk.dir - Path to Android SDK (by default similar to: /Users/user/Library/Android/sdk)
    • ndk.dir - Path to Android NDK (by default similar to: /Users/user/Library/Android/sdk/ndk-bundle)
  3. Copy file local.properties.yml.template to local.properties.yml. Update file local.properties.yml with proper paths:

    • swiftToolchain.dir - Path to Swift Toolchain (by default similar to: /Users/user/git/swift-everywhere-toolchain/ToolChain/swift-android-toolchain)
  4. Open iOS/HelloJNI.xcodeproj in Xcode 11 and run it on Device or iOS Simulator.

  5. Open folder Android in Android Studio and run it on Device or Android Simulator.

Links

You can’t perform that action at this time.