Closed jpsim closed 10 months ago
This is an issue with how Xcode launches applications. I believe it's because it sets a custom DYLD_LIBRARY_PATH
that interferes with this. If you launch the application on the simulator by tapping the icon after the crash, it works just fine. I encountered this issue many years ago (pre-Bazel), and in general you can name your frameworks after public or private system frameworks if you want to launch an application with Xcode.
I see, thanks for the info.
Description
When running an iOS app with a framework named "CoreUI", the app will crash on launch with an uncaught exception:
Presumably because CoreUI is also a private framework: https://github.com/nst/iOS-Runtime-Headers/blob/master/PrivateFrameworks/CoreUI.framework/CUICatalog.h
And presumably because rules_xcodeproj has different framework search path ordering than bazel on the CLI / Xcode.
Reproduction steps
With this project: coreui-crash.zip
bazel run xcodeproj && xed Demo.xcodeproj
The app should crash on launch with the following uncaught exception:
Building and running works from the command line:
bazel run //:CoreUIApp
Building and running works from Xcode and the command line if
name
in theBUILD
file is renamed to something else, likeCoolUI
.Expected behavior
The app should run and not crash just as it does with
bazel run //:CoreUIApp
on the command line.rules_xcodeproj version
1.14.2
Xcode version
15.1
Bazel version
7.0.0
rules_apple version
3.1.1
rules_swift version
1.13.0
Additional information
No response