diff --git a/.gitignore b/.gitignore index 0b46ff9..808432b 100644 --- a/.gitignore +++ b/.gitignore @@ -15,5 +15,6 @@ # vendor/ # Output of gomobile -age.aar -age-sources.jar \ No newline at end of file +build/android/age-sources.jar +build/android/age.aar +build/ios/Age.xcframework \ No newline at end of file diff --git a/Makefile b/Makefile index d60a4ee..db367d3 100644 --- a/Makefile +++ b/Makefile @@ -4,4 +4,7 @@ test: go test -race -v build-android: - gomobile bind -target android -o age.aar filippo.io/age github.com/MarinX/agemobile \ No newline at end of file + gomobile bind -target android -o build/android/age.aar filippo.io/age github.com/MarinX/agemobile + +build-ios: + gomobile bind -target ios -o build/ios/Age.xcframework filippo.io/age github.com/MarinX/agemobile \ No newline at end of file diff --git a/README.md b/README.md index 8c6665f..1e9ee7c 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ This package wraps age library into usable mobile library. ### Android -1. Get `age.aar` (You can get `age.aar` from [release page](https://github.com/MarinX/agemobile/releases) or clone the repo and execute `make build-android` to build .aar yourself) -2. Create `libs` folder in your app project android app and copy `age.aar` +1. Get `age.aar` (You can get `age.aar` from [release page](https://github.com/MarinX/agemobile/releases) or clone the repo and execute `make build-android` to build .aar yourself - Build artifact is located in `build/android` folder.) +2. Add `age.aar` to `libs` folder in your app project 3. Include dependency for Android in `build.gradle` ```gradle @@ -24,7 +24,9 @@ dependencies { ### iOS -No documentation, PR's welcome +1. Get `Age.xcframework` (You can get `Age.xcframework` from [release page](https://github.com/MarinX/agemobile/releases) or clone the repo and execute `make build-ios` to build yourself - Build artifact is located in `build/ios` folder.) +2. Copy `Age.xcframework` into iOS project framework folder +3. Import `Age` in Swift ## Usage @@ -92,7 +94,7 @@ No examples, yet! PR's welcome. ## Contributing -PR's are welcome. Please read [CONTRIBUTING.md](https://github.com/MarinX/agemobile/blob/master/CONTRIBUTING.md) for more info +PR's are welcome. Please read [CONTRIBUTING.md](https://github.com/MarinX/agemobile/blob/main/CONTRIBUTING.md) for more info ## License diff --git a/_examples/android/AgeMobile/app/libs/age.aar b/_examples/android/AgeMobile/app/libs/age.aar new file mode 100644 index 0000000..4703169 Binary files /dev/null and b/_examples/android/AgeMobile/app/libs/age.aar differ