dyld: Library not loaded 🍎 iOS

dyld: Library not loaded: @rpath/X.framework/X — Reason: image not found (crash on launch)

A dynamic framework the app needs at runtime isn’t embedded in the app bundle, so it crashes at launch.

Seen on: iOS

Meaning

Dynamic frameworks must be set to “Embed & Sign”. Swift packages built as dynamic libraries, or frameworks only linked (Do Not Embed), crash on device but may work in some simulator setups.

Common causes

  • Framework set to “Do Not Embed”
  • Runpath search paths missing @executable_path/Frameworks
  • Framework not built for the device architecture

⚡ Quick fix

  1. Set the framework to Embed & Sign (General → Frameworks, Libraries, and Embedded Content)
  2. Check LD_RUNPATH_SEARCH_PATHS
  3. Rebuild the framework for the target

Detailed fix by platform

Xcode

  1. swift
    # Target → General → Frameworks, Libraries, and Embedded Content → Embed & Sign
    LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks

How to diagnose

  1. Embed — Setting for the framework
  2. Bundle — Present in App.app/Frameworks?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.