From 84f9414aa47019f61ee3cfb3c222587058825fcc Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Wed, 31 Aug 2022 11:29:53 +0200 Subject: [PATCH] refactor(bindings): Simplify debug build script --- bindings/apple/debug_build_xcframework.sh | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/bindings/apple/debug_build_xcframework.sh b/bindings/apple/debug_build_xcframework.sh index ace17ec24..92dbd06b3 100755 --- a/bindings/apple/debug_build_xcframework.sh +++ b/bindings/apple/debug_build_xcframework.sh @@ -34,21 +34,18 @@ REL_TYPE_DIR="debug" # iOS Simulator arm64 if [ "$ACTIVE_ARCH" = "arm64" ]; then - cargo build -p matrix-sdk-ffi ${REL_FLAG} --target "aarch64-apple-ios-sim" - - lipo -create \ - "${TARGET_DIR}/aarch64-apple-ios-sim/${REL_TYPE_DIR}/libmatrix_sdk_ffi.a" \ - -output "${GENERATED_DIR}/libmatrix_sdk_ffi_iossimulator.a" - + TARGET="aarch64-apple-ios-sim" # iOS Simulator intel -else - cargo build -p matrix-sdk-ffi ${REL_FLAG} --target "x86_64-apple-ios" - - lipo -create \ - "${TARGET_DIR}/x86_64-apple-ios/${REL_TYPE_DIR}/libmatrix_sdk_ffi.a" \ - -output "${GENERATED_DIR}/libmatrix_sdk_ffi_iossimulator.a" +else + TARGET="x86_64-apple-ios" fi +cargo build -p matrix-sdk-ffi ${REL_FLAG} --target "$TARGET" + +lipo -create \ + "${TARGET_DIR}/$TARGET/${REL_TYPE_DIR}/libmatrix_sdk_ffi.a" \ + -output "${GENERATED_DIR}/libmatrix_sdk_ffi_iossimulator.a" + # Generate uniffi files uniffi-bindgen generate "${SRC_ROOT}/bindings/matrix-sdk-ffi/src/api.udl" --language swift --out-dir ${GENERATED_DIR}