Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / apple / XCFramework / build_xcframework.sh
build_xcframework.sh29 lines · 1.2 KiBRaw
| 1 | #!/bin/sh |
| 2 | # EverySync XCFramework build (Phase 3, Mac only). |
| 3 | # Wraps BUILD_NOTES.md steps 1-4. Fails fast; prints the manual fallback. |
| 4 | # Usage (repo root): sh apple/XCFramework/build_xcframework.sh |
| 5 | set -eu |
| 6 | |
| 7 | RUST_MANIFEST="library/e2ee-p2p/src/main/rust/Cargo.toml" |
| 8 | INTEROP_DIR="library/everysync-core/src/nativeInterop/cinterop/e2eePqc" |
| 9 | |
| 10 | echo "==> 1/4 Rust static libs (device + simulator ARM64)" |
| 11 | cargo build --target aarch64-apple-ios --release --manifest-path "$RUST_MANIFEST" |
| 12 | cargo build --target aarch64-apple-ios-sim --release --manifest-path "$RUST_MANIFEST" |
| 13 | |
| 14 | echo "==> 2/4 cbindgen header" |
| 15 | if ! command -v cbindgen >/dev/null 2>&1; then |
| 16 | echo "missing cbindgen (cargo install cbindgen)" >&2 |
| 17 | exit 1 |
| 18 | fi |
| 19 | cbindgen --crate e2ee-p2p --output "$INTEROP_DIR/e2ee_pqc.h" \ |
| 20 | --config library/e2ee-p2p/src/main/rust/cbindgen.toml |
| 21 | |
| 22 | echo "==> 3/4 cinterop .def already in $INTEROP_DIR/e2eePqc.def (verbatim from IOS_PQC_NOTES.md)" |
| 23 | test -f "$INTEROP_DIR/e2eePqc.def" |
| 24 | |
| 25 | echo "==> 4/4 XCFramework via Gradle" |
| 26 | ./gradlew :library:everysync-core:assembleEverysyncCoreXCFramework |
| 27 | |
| 28 | echo "OK: EverysyncCore.xcframework built. Link it into Passwords, Notes," |
| 29 | echo "Hub, the Credential Provider extension, and the Share extension." |