HomePhabricator
Diffusion Comm a46af06af356

[native] fix iOS build on x86_64

Description

[native] fix iOS build on x86_64

Summary:
In the Library Search Paths section of our Xcode project, we list:

"$(SRCROOT)/../native_rust_library/target/aarch64-apple-ios/release",
"$(SRCROOT)/../native_rust_library/target/x86_64-apple-ios/release",

When we build for Any iOS Device (arm64), Xcode locates the arm64 static library in the first search path. Then, when we build for Simulator (x86_64), Xcode again locates the arm64 static library in the first search path, and we get an error.

If we haven't previously built for Any iOS Device (arm64), when we build for Simulator (x86_64), Xcode doesn't find anything in the first search path, locates the x86_64 static library in the second search path, and builds successfully.

The solution is to set the search paths conditionally.

Test Plan: built the app for any iOS device, then for simulator, then did an archive build (release). All succeeded. Tried them in various orders just to be sure.

Reviewers: ashoat, atul

Reviewed By: ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D9886

Details

Provenance
varunAuthored on Nov 14 2023, 1:00 PM
Reviewer
ashoat
Differential Revision
D9886: [native] fix iOS build on x86_64
Parents
rCOMMf4bed298e4f8: [web] introduce status indicator component
Branches
Unknown
Tags
Unknown