Frameworks
What a framework is
A framework is a .framework bundle directory containing a compiled binary (the library), resources (assets, strings, storyboards) and an interface description: headers + module.modulemap for C/ObjC, or .swiftmodule/.swiftinterface for Swift. The app imports it as a module (import AVFoundation) and links against it. An XCFramework is a container with variants of one framework for several platforms and architectures (iOS device, iOS Simulator, macOS, visionOS) — the standard format for distributing binary SDKs. Your own modules are more often packaged as Swift packages (SPM), which Xcode builds into the same kind of libraries.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep