Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.

Commit 1940671

Browse files
committed
Dev: update README
1 parent d8bc23b commit 1940671

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

README.md

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,24 @@
22

33
This version of the app is called todo-swift-mvvm-live, and it uses Swift data model and some Architecture Components like ViewModel, LiveData, and other lifecycle-aware classes. It's based on the [todo-mvvm-databinding](https://github.com/googlesamples/android-architecture/tree/todo-mvvm-databinding/) sample, which uses the [Data Binding Library](http://developer.android.com/tools/data-binding/guide.html#data_objects) to display data and bind UI elements to actions.
44

5-
## How to compile
5+
## How to compile (Only macOS)
66

7-
First of all, instal swift android toolchain [![Download](https://api.bintray.com/packages/readdle/swift-android-toolchain/swift-android-toolchain/images/download.svg) ](https://bintray.com/readdle/swift-android-toolchain/swift-android-toolchain/_latestVersion):
7+
First of all, preapre development enviroment according to https://github.com/readdle/swift-android-toolchain#prepare-environment
88

9-
```sh
10-
SWIFT_ANDROID=4.0l
11-
wget https://dl.bintray.com/readdle/swift-android-toolchain/swift-android-$SWIFT_ANDROID.zip
12-
unzip swift-android-$SWIFT_ANDROID.zip
13-
rm -rf swift-android-$SWIFT_ANDROID.zip
14-
unset SWIFT_ANDROID
15-
```
16-
17-
Then add enviroment variables:
9+
Set swift android toolchain path for Android Studio
1810

19-
```sh
20-
SWIFT_ANDROID=4.0l
21-
export SWIFT_ANDROID_HOME=$HOME/android/swift-android-$SWIFT_ANDROID
22-
export PATH=$SWIFT_ANDROID_HOME/bin:$SWIFT_ANDROID_HOME/build-tools/current:$PATH
23-
unset SWIFT_ANDROID
11+
at local.properties:
12+
```
13+
ndk.dir=<PATH_TO_NDK>
14+
swift-android.dir=<PATH_TO_SWIFT_ANDROID_TOOLCHAIN>
2415
```
2516

26-
Install Swift Android Build tools (Optional):
27-
17+
or add to your .profile:
2818
```
29-
swift android tools --update
19+
launchctl setenv ANDROID_NDK_HOME <PATH_TO_NDK>
20+
launchctl setenv SWIFT_ANDROID_HOME <PATH_TO_SWIFT_ANDROID_TOOLCHAIN>
3021
```
3122

32-
3323
Then build with Android Studio or just gradlew
3424

3525
```

0 commit comments

Comments
 (0)