mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 06:26:15 +01:00
feat: support ios-arm64_x86_64-maccatalyst in xcframework (#69)
* feat: support maccatalyst in xcframework * fix: missing ios-macabi targets in ci
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -35,6 +35,8 @@ jobs:
|
|||||||
rustup target add aarch64-apple-ios-sim && \
|
rustup target add aarch64-apple-ios-sim && \
|
||||||
rustup target add aarch64-apple-darwin && \
|
rustup target add aarch64-apple-darwin && \
|
||||||
rustup target add x86_64-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
|
cargo install --force --locked bindgen-cli
|
||||||
|
|
||||||
- name: Build all Apple targets and examples/tools
|
- name: Build all Apple targets and examples/tools
|
||||||
|
|||||||
15
justfile
15
justfile
@@ -40,6 +40,9 @@ xcframework: apple-build
|
|||||||
lipo -create -output swift/libs/idevice-ios-sim.a \
|
lipo -create -output swift/libs/idevice-ios-sim.a \
|
||||||
target/aarch64-apple-ios-sim/release/libidevice_ffi.a \
|
target/aarch64-apple-ios-sim/release/libidevice_ffi.a \
|
||||||
target/x86_64-apple-ios/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 \
|
lipo -create -output swift/libs/idevice-macos.a \
|
||||||
target/aarch64-apple-darwin/release/libidevice_ffi.a \
|
target/aarch64-apple-darwin/release/libidevice_ffi.a \
|
||||||
target/x86_64-apple-darwin/release/libidevice_ffi.a
|
target/x86_64-apple-darwin/release/libidevice_ffi.a
|
||||||
@@ -48,6 +51,7 @@ xcframework: apple-build
|
|||||||
-library target/aarch64-apple-ios/release/libidevice_ffi.a -headers swift/include \
|
-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-ios-sim.a -headers swift/include \
|
||||||
-library swift/libs/idevice-macos.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
|
-output swift/IDevice.xcframework
|
||||||
|
|
||||||
zip -r swift/bundle.zip swift/IDevice.xcframework
|
zip -r swift/bundle.zip swift/IDevice.xcframework
|
||||||
@@ -68,7 +72,16 @@ apple-build: # requires a Mac
|
|||||||
BINDGEN_EXTRA_CLANG_ARGS="--sysroot=$(xcrun --sdk iphonesimulator --show-sdk-path)" \
|
BINDGEN_EXTRA_CLANG_ARGS="--sysroot=$(xcrun --sdk iphonesimulator --show-sdk-path)" \
|
||||||
cargo build --release --target x86_64-apple-ios
|
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
|
# macOS (native) – no special env needed
|
||||||
cargo build --release --target aarch64-apple-darwin
|
cargo build --release --target aarch64-apple-darwin
|
||||||
cargo build --release --target x86_64-apple-darwin
|
cargo build --release --target x86_64-apple-darwin
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user