Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: lower iOS compatibility #139

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "Aries-Askar"

env:
RUST_VERSION: "1.60.0"
RUST_VERSION: "1.61.0"
CROSS_VERSION: "0.2.4"

on:
Expand Down Expand Up @@ -371,17 +371,9 @@ jobs:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
# First version with support for cdylib: https://github.com/rust-lang/rust/pull/100636
toolchain: "1.65.0"
toolchain: ${{ env.RUST_VERSION }}
targets: ${{ matrix.target }}

# Not useful unless the toolchain version matches the default
# - name: Cache cargo resources
# uses: Swatinem/rust-cache@v2
# with:
# shared-key: deps
# save-if: false

- name: Build
run: |
cargo build --lib --release --target ${{matrix.target}}
Expand All @@ -390,7 +382,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: library-${{ matrix.target }}
path: target/${{ matrix.target }}/release/libaries_askar.dylib
path: target/${{ matrix.target }}/release/libaries_askar.a

build-android:
name: Build library (Android)
Expand Down Expand Up @@ -436,7 +428,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Fetch dynamic libraries
- name: Fetch static libraries
uses: actions/download-artifact@v3

- run: >
Expand Down
12 changes: 6 additions & 6 deletions build-xcframework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ then
fi

NAME="aries_askar"
BUNDLE_NAME="aries-askar"
VERSION=$(cargo generate-lockfile && cargo pkgid | sed -e "s/^.*#//")
BUNDLE_IDENTIFIER="org.hyperledger.$NAME"
LIBRARY_NAME="lib$NAME.dylib"
BUNDLE_IDENTIFIER="org.hyperledger.$BUNDLE_NAME"
LIBRARY_NAME="lib$NAME.a"
XC_FRAMEWORK_NAME="$NAME.xcframework"
FRAMEWORK_LIBRARY_NAME=$NAME
FRAMEWORK_NAME="$FRAMEWORK_LIBRARY_NAME.framework"
HEADER_NAME="lib$NAME.h"
OUT_PATH="out"
MIN_IOS_VERSION="12.0"

# Setting some default paths
AARCH64_APPLE_IOS_PATH="./target/aarch64-apple-ios/release"
Expand Down Expand Up @@ -156,6 +158,8 @@ cat <<EOT >> Info.plist
<string>$VERSION</string>
<key>NSPrincipalClass</key>
<string></string>
<key>MinimumOSVersion</key>
<string>$MIN_IOS_VERSION</string>
</dict>
</plist>
EOT
Expand All @@ -179,8 +183,4 @@ xcodebuild -create-xcframework \
echo "cleaning up..."
rm -rf $FRAMEWORK_NAME real sim

echo "Fixing the identifiers of the library..."
install_name_tool -id @rpath/$NAME.framework/$FRAMEWORK_LIBRARY_NAME $XC_FRAMEWORK_NAME/ios-arm64/$FRAMEWORK_NAME/$FRAMEWORK_LIBRARY_NAME
install_name_tool -id @rpath/$NAME.framework/$FRAMEWORK_LIBRARY_NAME $XC_FRAMEWORK_NAME/ios-arm64_x86_64-simulator/$FRAMEWORK_NAME/$FRAMEWORK_LIBRARY_NAME

echo "Framework written to $OUT_PATH/$XC_FRAMEWORK_NAME"