chore(ios): optimize build workflow (#11132)

This commit is contained in:
EYHN
2025-03-24 14:32:45 +00:00
parent 80d451cc51
commit c1b3e25fc7
123 changed files with 3964 additions and 109 deletions

View File

@@ -1,12 +1,11 @@
#!/bin/zsh
# This script provides a quick setup process for iOS developers working on this project.
set -e
set -o pipefail
# packages/frontend/apps/ios/
cd "$(dirname "$0")"
export SCRIPT_DIR_PATH=$(pwd)
@@ -32,26 +31,16 @@ echo "[*] current object version: $CURRENT_VERSION"
sed -i '' "s/objectVersion = $CURRENT_VERSION/objectVersion = 56/" "$XCPROJ_PATH"
yarn affine @affine/ios build
yarn affine @affine/ios cap sync
yarn affine @affine/ios sync
echo "[*] interacting with rust..."
rustup target add aarch64-apple-ios
rustup target add aarch64-apple-ios-sim
rustup target add aarch64-apple-darwin
cargo build -p affine_mobile_native --lib --release --target aarch64-apple-ios
cargo run -p affine_mobile_native --bin uniffi-bindgen \
generate \
--library target/aarch64-apple-ios/release/libaffine_mobile_native.a \
--language swift \
--out-dir packages/frontend/apps/ios/App/App/uniffi
echo "[*] interacting with graphql..."
apollo-ios-cli generate --path $SCRIPT_DIR_PATH/apollo-codegen-config.json
echo "[*] setting object version back to $CURRENT_VERSION"
sed -i '' "s/objectVersion = 56/objectVersion = $CURRENT_VERSION/" "$XCPROJ_PATH"
echo "[*] codegen..."
yarn affine @affine/ios codegen
echo "[+] setup complete"
yarn affine @affine/ios cap open ios
yarn affine @affine/ios xcode