Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Build and run Xcode through Zed

Avatar for Tommy Han Tommy Han
February 28, 2026

Build and run Xcode through Zed

Avatar for Tommy Han

Tommy Han

February 28, 2026

More Decks by Tommy Han

Other Decks in Technology

Transcript

  1. • You Cre a ted a UI View, or m

    a ybe some view components… • You press the Pl a y Button, w a it for a while, simul a tor a ppe a rs… • Gre a t! You c a n see you a pp a live!
  2. iOS Simulator Run Pipeline (Technical, Step-by-Step) From dependency/library lineage to

    process launch and LLDB attach Build + Link (Xcode/clang/ld) Install + Launch (CoreSimulator/launchd_sim/dyld_sim) Debug + Iterate (debugserver/LLDB) 1 Resolve dependency graph targets + SwiftPM/Pods/Carthage => library lineage + build order 2 Compile sources swiftc/clang -> .o + .swiftmodule per target + per architecture 3 Assemble artifacts .a static libs / .framework outputs module interfaces + resources 4 Link simulator app binary ld -> Mach-O (arm64-simulator) writes LC_LOAD_DYLIB chain 5 Bundle + sign for simulator App.app + embedded frameworks/resources ad-hoc signing (no device provisioning) 6 Install into simulator device container CoreSimulatorService / simctl install 7 launchd_sim spawns app process SpringBoard requests app launch 8 dyld_sim resolves and loads dylibs embedded frameworks + shared cache + inits 9 Runtime entry dyld hands off -> main / UIApplicationMain / SwiftUI App 10 Attach debugger + materialize symbols debugserver bridge; LLDB loads dSYM; breakpoints/watchpoints bind Edit code -> incremental compile/link -> relaunch -> LLDB re-attaches Inspect linkage: otool -L AppBinary | Launch manually: xcrun simctl launch booted <bundle-id> | Attach manually: lldb -n <AppName>
  3. Limitations What can we do better? • Inst a ll

    Libr a ries • Xcode Instruments • Debug Log Filtering
  4. Appendix • https://github.com/tommyming/zed- a pp-build-demo • https://luxmentis.org/blog/ios- a nd-m a

    c- a pps-in-zed/ • https://luxmentis.org/blog/test-xcode- a pps-in-zed/ • https://luxmentis.org/blog/swiftui-previews-in-zed/