All Projects → SwiftJava → android_toolchain

SwiftJava / android_toolchain

Licence: other
Issue tracking repo for Swift toolchain for Android.

Projects that are alternatives of or similar to android toolchain

PlantShopUI-Android
Check out the new style for App Design aims for the Online Plant Shop Service using jetpack compose...😉😀😁😎
Stars: ✭ 29 (+20.83%)
Mutual labels:  android-development
Shipr-Community-Android
Shipr Social is the Multi Platform Chat Project for Developers
Stars: ✭ 21 (-12.5%)
Mutual labels:  android-development
AndroidEssentialLibraries
👻 Android Essential Libraries - A couple of the Android Libraries to use in your Projects 🛠
Stars: ✭ 203 (+745.83%)
Mutual labels:  android-development
android-online-course
Android Online Course
Stars: ✭ 22 (-8.33%)
Mutual labels:  android-development
nestedRecycler
A sample tutorial android app to implement Nested Recycler View easily using Kotlin
Stars: ✭ 61 (+154.17%)
Mutual labels:  android-development
recycler-adapter
RecyclerView-driven declarative UIs
Stars: ✭ 124 (+416.67%)
Mutual labels:  android-development
Debt-Manager
A personal app to store people that owe you money or you owe money to. "Mo Money Mo Problems" 🎵 - The Notorious B.I.G. 😎
Stars: ✭ 22 (-8.33%)
Mutual labels:  android-development
AndroidBatteryStats
Displays all battery stats of an Android device using broadcast receiver.
Stars: ✭ 20 (-16.67%)
Mutual labels:  android-development
safe-android-fragments
[DEPRECATED] The goal of this example is to show you a way to prevent the fragment state loss and consequently avoid potential crashes of your app using kotlin extensions and android support library (version up to 26.0.0).
Stars: ✭ 15 (-37.5%)
Mutual labels:  android-development
android-developer-nanodegree-by-google
Projects for Udacity Android Developer Nanodegree - Sandwich Club, Popular Movies, Baking App (WIP), Build It Bigger, Make Your App Material, and Go Ubiquitous
Stars: ✭ 14 (-41.67%)
Mutual labels:  android-development
fullscreenintentexample
Full-Screen Intent Notification Android Example
Stars: ✭ 39 (+62.5%)
Mutual labels:  android-development
androidCourseKotlin
Android Course in Kotlin
Stars: ✭ 19 (-20.83%)
Mutual labels:  android-development
android-tableview-kotlin
Android's missing TableView component.
Stars: ✭ 40 (+66.67%)
Mutual labels:  android-development
rxandroid2-retrofit2
Small tutorial to get started with RxAndroid 2 and Retrofit 2
Stars: ✭ 55 (+129.17%)
Mutual labels:  android-development
FireFiles
Powerful Android File Manager for everything that runs on Android OS (Android TV, Android Watch, Mobile, etc)
Stars: ✭ 37 (+54.17%)
Mutual labels:  android-development
click-shrink-effect
A simple library to add a temporary shrinking effect on View while clicking.
Stars: ✭ 32 (+33.33%)
Mutual labels:  android-development
Retromock
Java library for mocking responses in a Retrofit service.
Stars: ✭ 48 (+100%)
Mutual labels:  android-development
Foodspace
Foodspace is an app made using Flutter and Firebase, where people can register and start exploring wide categories of restaurants present in their cities and also check the reviews and feedback for a specific restaurant. There is also a 'likes section' where all the restaurants liked by the user are displayed.
Stars: ✭ 73 (+204.17%)
Mutual labels:  android-development
Reside-Menu
By applying viewpager animation you can also make AMAZING Reside Menu's
Stars: ✭ 72 (+200%)
Mutual labels:  android-development
Cofi
Simple coffee timer
Stars: ✭ 18 (-25%)
Mutual labels:  android-development

Swift toolchain for Android

This is the issue tracking repo for the Android toolchain for including Swift into an Android application built on macOS X or Ubuntu Linux 16.04.

It can be downloaded here.

It's intended to be used in hybrid Java/Swift applications, an example of which is swift-android-samples or swift-android-kotlin .

After you have downloaded the toolchain, all that should be required is to run the script swift-install/setup.sh to install the gradle plugin.

Clone the example project swift-android-samples and cd swifthello; ./gradlew installDebug with an Android Lolipop (api-21 or more recent) device to get started. This uses the Swift package manager to build the a shared library and copies in those for swift itself.

There are a couple of Android specific APIs in this release which need to be used to setup thread cleanup, the TMPDIR environment variable and a Certificate Authority "pem" file in order to be able to use SSL/https:. These are setup in the example project here and here.

A hybrid app is a conventional Android Java app that loads a swifthello.so dynamic library on initialisation. The developer specifies a pair of Java interfaces to communicate to and from Swift and a code generator genswift.sh generates Swift sources to realise the JNI calls to implement these protocols. The interface for messaging from Java to Swift must have a name that ends in "Listener" and the interface in the opposite direction is normally the "Responder".

There is one final JNI hook that needs to be coded by hand to bind the Listener and Responder to each end of the pipe. This is the code here and here.

Status

This toolchain could be considered to be at a fairly well advanced Beta stage with a view to updating it to a 1.0 release when Swift 4.0 is finalised. Please take the time to report any issues you encounter, preferably with an simple example project if possible on this repo.

Building the toolchain

I'd not recommend trying this at present as it is by no means an automated process. I used slightly modified versions of the swifty-robot-environment scripts. libdispatch needs the most TLC. You need to make sure the TRASHIT macro is defined in src/internal.h and modify src/Makefile to link against -lswiftCore and -latomic with the appropriate paths. At the time of writing, there are also a few currently open PRs you'll need to merge in 1113, 10836 and 55. Preparing a macOS toolchain currently involves grafting binaries for swift and swift-build from a macOS toolchain into the Linux distribution and rebuilding swiftc.

Licenses

This binary package contains software built from the following repositories:

https://www.openssl.org

https://github.com/curl/curl

git://git.gnome.org/libxml2 or https://github.com/android/platform_external_libxml2

https://github.com/SwiftAndroid/libiconv-libicu-android

https://github.com/apple/swift

https://github.com/apple/swift-corelibs-libdispatch

https://github.com/apple/swift-corelibs-foundation

Built using a fork of the very handy scripts in: https://github.com/gonzalolarralde/swifty-robot-environment

This kit contains some headers and libraries from the Android NDK https://developer.android.com/studio/index.html

Your use of this software is subject to the license agreements of these projects and,

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].