Skip to content

Commit 36f2cc4

Browse files
committed
fix(ios): build script
1 parent c027c42 commit 36f2cc4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

scripts/ios/build_all.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env bash
2+
set -e
3+
rm -rf build
24
mkdir build
35
echo ''$(git log -1 --pretty=format:"%H")' '$(date) >> build/git_commit_version.txt
46
VERSIONS_FILE=../../lib/git_versions.dart
@@ -8,15 +10,19 @@ if [ ! -f "$VERSIONS_FILE" ]; then
810
fi
911
COMMIT=$(git log -1 --pretty=format:"%H")
1012
OS="IOS"
11-
sed -i '' "/\/\*${OS}_VERSION/c\\/\*${OS}_VERSION\*\/ const ${OS}_VERSION = \"$COMMIT\";" $VERSIONS_FILE
13+
sed -i '' '/\/\*${OS}_VERSION/c\'$'\n''/\*${OS}_VERSION\*\/ const ${OS}_VERSION = "'"$COMMIT"'";' "$VERSIONS_FILE"
1214
cp -r ../../rust build/rust
1315
cd build/rust
1416

1517
rustup target add aarch64-apple-ios x86_64-apple-ios
1618

1719
# building
1820
cp target/epic_cash_wallet.h libepic_cash_wallet.h
19-
cargo lipo --release
21+
22+
export IPHONEOS_DEPLOYMENT_TARGET=15.0
23+
export RUSTFLAGS="-C link-arg=-mios-version-min=15.0"
24+
cargo build --release --target aarch64-apple-ios
25+
#cargo lipo --release
2026

2127
# moving files to the ios project
2228
inc=../../../../ios/include

0 commit comments

Comments
 (0)