Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 1.02 KB

README.md

File metadata and controls

36 lines (28 loc) · 1.02 KB

Creating .a file for iOS.

Opens Cargo.toml file to change the create-type:

[lib]
crate-type = [
    'lib',
    'staticlib'
]

Go to UNIFFI folder here and run:

cargo build --release --target aarch64-apple-ios
cargo build --release --target x86_64-apple-ios

lipo -create target/aarch64-apple-ios/release/libdidcomm_uniffi.a target/x86_64-apple-ios/release/libdidcomm_uniffi.a -output target/libDidcommiOS.a

We created a libDidcommiOS.a that runs both for iOS Simulator (arm64) and iOS Device (aarch64).

See the available architectures:

rustup target list

Verify the architecture:

lipo -info target/libDidcommiOS.a

Output: Architectures in the fat file: target/libDidcommiOS.a are: x86_64 arm64

Also reed:

Dealing with Rust to build PactSwiftMockServer Cross-compiling for Xcode