diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dcee207..b36dc43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,8 @@ jobs: rustup target add aarch64-apple-ios-sim && \ rustup target add aarch64-apple-darwin && \ rustup target add x86_64-apple-darwin && \ + rustup target add aarch64-apple-ios-macabi && \ + rustup target add x86_64-apple-ios-macabi && \ cargo install --force --locked bindgen-cli - name: Build all Apple targets and examples/tools diff --git a/justfile b/justfile index 1166802..76a6cad 100644 --- a/justfile +++ b/justfile @@ -40,6 +40,9 @@ xcframework: apple-build lipo -create -output swift/libs/idevice-ios-sim.a \ target/aarch64-apple-ios-sim/release/libidevice_ffi.a \ target/x86_64-apple-ios/release/libidevice_ffi.a + lipo -create -output swift/libs/idevice-maccatalyst.a \ + target/aarch64-apple-ios-macabi/release/libidevice_ffi.a \ + target/x86_64-apple-ios-macabi/release/libidevice_ffi.a lipo -create -output swift/libs/idevice-macos.a \ target/aarch64-apple-darwin/release/libidevice_ffi.a \ target/x86_64-apple-darwin/release/libidevice_ffi.a @@ -48,8 +51,9 @@ xcframework: apple-build -library target/aarch64-apple-ios/release/libidevice_ffi.a -headers swift/include \ -library swift/libs/idevice-ios-sim.a -headers swift/include \ -library swift/libs/idevice-macos.a -headers swift/include \ + -library swift/libs/idevice-maccatalyst.a -headers swift/include \ -output swift/IDevice.xcframework - + zip -r swift/bundle.zip swift/IDevice.xcframework openssl dgst -sha256 swift/bundle.zip @@ -68,7 +72,16 @@ apple-build: # requires a Mac BINDGEN_EXTRA_CLANG_ARGS="--sysroot=$(xcrun --sdk iphonesimulator --show-sdk-path)" \ cargo build --release --target x86_64-apple-ios + # Mac Catalyst (arm64) + # AWS-LC has an a hard time compiling for an iOS with macabi target, so we switch to ring. + BINDGEN_EXTRA_CLANG_ARGS="--sysroot=$(xcrun --sdk macosx --show-sdk-path)" \ + cargo build --release --target aarch64-apple-ios-macabi --no-default-features --features "ring full" + + # Mac Catalyst (x86_64) + # AWS-LC has an a hard time compiling for an iOS with macabi target, so we switch to ring. + BINDGEN_EXTRA_CLANG_ARGS="--sysroot=$(xcrun --sdk macosx --show-sdk-path)" \ + cargo build --release --target x86_64-apple-ios-macabi --no-default-features --features "ring full" + # macOS (native) – no special env needed cargo build --release --target aarch64-apple-darwin cargo build --release --target x86_64-apple-darwin -