Use file
to check the archicture of the build executable. The build folder can be located with the Product > Show Build Folder in Finder menu.
pwd
# …path/to/Build
cd Products/Debug-iphonesimulator/ExampleName.app
file ExampleName
# Mach-O 64-bit executable x86_64
### x86_64 can raise the empty LLDB target error when debugging
### iOS in the Simulator on an Apple Silicon computer.
The following settings resolved the …using an empty LLDB target…
error for Xcode 15.2 and the associated iPhone Simulator:
.xcodeproj Settings
Title |
Name |
Debug |
Release |
Architectures |
ARCHS |
default: $(ARCHS_STANDARD) |
default: $(ARCHS_STANDARD) |
Excluded Architectures |
EXCLUDED_ARCHS |
unset |
unset |
Build Active Architectures Only |
ONLY_ACTIVE_ARCH |
Yes |
default: No |
CocoaPods Podfile
### other: `ONLY_ACTIVE_ARCH` = YES only for `*Debug*` configurations
if config.name.include?("Debug")
config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
end
debug.xcconfig
As FYI, the ONLY_ACTIVE_ARCH
setting can be added to *.xcconfig
files for both implementation and documentation purposes.
// Resolve "Error creating LLDB target … using an empty LLDB target…"
ONLY_ACTIVE_ARCH = YES