Skip to content

Commit f9e6cad

Browse files
committed
Rework for use with toolchain beta 2
1 parent 3ebea25 commit f9e6cad

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,13 @@ This is the issue tracking repo for the Android toolchain for including Swift in
66

77
It can be downloaded [here](http://johnholdsworth.com/android_toolchain.tgz).
88

9-
This link contains a README which will direct you to the current version hosted on Goole Drive. It's intended to be used in hybrid Java/Swift applications, an example of which is [swift-android-samples](https://github.com/SwiftJava/swift-android-samples) or [swift-android-kotlin](https://github.com/SwiftJava/swift-android-kotlin) .
9+
It's intended to be used in hybrid Java/Swift applications, an example of which is [swift-android-samples](https://github.com/SwiftJava/swift-android-samples) or [swift-android-kotlin](https://github.com/SwiftJava/swift-android-kotlin) .
1010

1111
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.
1212

1313
Clone the example project [swift-android-samples](https://github.com/SwiftJava/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.
1414

15-
The default build will require the following Android SDK resources:
16-
17-
sdkmanager "platforms;android-25" "build-tools;25.0.3" "platform-tools"
18-
19-
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](https://github.com/SwiftJava/swift-android-samples/blob/master/swifthello/src/main/java/net/zhuoweizhang/swifthello/SwiftHello.java#L35) and [here](https://github.com/SwiftJava/swift-android-samples/blob/master/swifthello/src/main/swift/Sources/main.swift#L20).
15+
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](https://github.com/SwiftJava/swift-android-samples/blob/master/swifthello/src/main/java/net/zhuoweizhang/swifthello/SwiftHello.java#L44) and [here](https://github.com/SwiftJava/swift-android-samples/blob/master/swifthello/src/main/swift/Sources/main.swift#L20).
2016

2117
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](https://github.com/SwiftJava/SwiftJava/blob/master/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".
2218

0 commit comments

Comments
 (0)