Static Frameworks

iOS
In iOS, static frameworks are precompiled libraries of code that are linked to an iOS app at build time to provide additional functionality. They contain both the code needed to perform a specific task and are copied into the app's binary at build time.
"Static Frameworks" are often used interchangably with "Static Libraries". "Static" means that the code and resources are statically linked, e.g. at build-time vs. being dynamically linked (at run-time).
Statically linked code is included in compiled binary. Code can be statically linked in the main app binary or in app extensions like a plugin or watch app.
Static frameworks are more performant than dynamic frameworks, both for size and runtime metrics. That said, static frameworks can't be shared across your app bundle (between the main app binary and other extensions).
General rule, if you're sharing code across multiple binaries, use dynamic frameworks. Otherwise, use static.
Featured Analysis: Twitter 🧵 on how the Mastodon iOS app was statically linking the same libraries in multiple places.

Sign up for our newsletter 🛸

Never miss a post or product update



2024 © Emerge Tools, Inc. All rights reserved.