mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 18:46:19 +08:00
fix(ios): crash at swift runtime error (#13635)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Fetch copilot model options per prompt (default, optional, pro) with generated GraphQL query and schema types. * **Chores** * Upgraded iOS deps: Apollo iOS 1.23.0, EventSource 0.1.5, Swift Collections 1.2.1. * Switched Intelligents to static linking and updated project integration. * Parameterized and standardized GraphQL codegen tooling; setup automation now syncs versions and safely backs up/restores custom scalars. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -38,9 +38,23 @@ rustup target add aarch64-apple-ios
|
||||
rustup target add aarch64-apple-ios-sim
|
||||
rustup target add aarch64-apple-darwin
|
||||
|
||||
echo "[*] syncing apollo version..."
|
||||
LATEST_VERSION="1.23.0"
|
||||
sed -i '' "s/exact: \"[^\"]*\"/exact: \"$LATEST_VERSION\"/g" $SCRIPT_DIR_PATH/App/Packages/AffineGraphQL/Package.swift
|
||||
echo "[*] apollo version synced to $LATEST_VERSION"
|
||||
|
||||
echo "[*] backing up CustomScalars..."
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
mkdir -p "$TEMP_DIR"
|
||||
function cleanup { rm -rf "$TEMP_DIR"; }
|
||||
trap cleanup EXIT
|
||||
CUSTOM_SCALARS_DIR=$SCRIPT_DIR_PATH/App/Packages/AffineGraphQL/Sources/Schema/CustomScalars
|
||||
cp -r $CUSTOM_SCALARS_DIR/* $TEMP_DIR/
|
||||
|
||||
echo "[*] codegen..."
|
||||
yarn affine @affine/ios codegen
|
||||
rm -rf $CUSTOM_SCALARS_DIR/*
|
||||
yarn affine @affine/ios codegen "1.23.0"
|
||||
cp -r $TEMP_DIR/* $CUSTOM_SCALARS_DIR/
|
||||
|
||||
echo "[+] setup complete"
|
||||
|
||||
yarn affine @affine/ios xcode
|
||||
|
||||
Reference in New Issue
Block a user