Closed sanju-naik closed 1 year ago
Hey @sanju-naik the build file looks valid and it's hard to tell why you hit the error. We've got a test case for a similar BUILD file inside of:
tests/ios/xcframeworks/Basic/BasicXCFramework/BUILD.bazel
This said, the test case in rules_ios is ran with --features apple.arm64_simulator_use_device_deps
: a lot of the code was written when there wasn't many pods on Apple Silicon yet - is it possible there's a bug if you don't use the feature? The code should still give you the simulator slice - I'd suggest trying your invocation with:
bazel build --ios_multi_cpus=sim_arm64 --features apple.arm64_simulator_use_device_deps //target
Thank you @jerrymarino This worked.
I believe this flag --features apple.arm64_simulator_use_device_deps
works with all CPU archs such as arm64 or x86_64 or sim_arm64
, so its safe to add this to .bazelrc
and use it as default build option?
@sanju-naik you got it - glad that fixes it for you.
Yeah the feature is safe to use 100% of the time: you often just add it to the .bazelrc
. It's definitely a rules_ios bug and something we should turn on by default / fix the bug by removing the disabled codepath.
Perfect. Thank you!
Hi,
I am trying to Integrate FBSDKCoreKit (https://github.com/facebook/facebook-ios-sdk) Cocoapod into Bazel Project, FBSDKCoreKit is distributed as XCFramework, and when the plugin generates BUILD file its missing
sim_arm64
insupported_archs
.Here is the generated BUILD file containing only simulator Slice for FBSDKCoreKit, As it can be seen sim_arm64 is missing
supported_archs
.With this BUILD file, when I run
bazel build --ios_multi_cpus=sim_arm64 //target
, Build fails with a missing Slice error