Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

Lazy Loading Dynamic Libraries and the Plugin-Architecture on iOS (2025)

The article explores techniques for lazy loading dynamic libraries (dylibs) on iOS to build plugin architectures, overcoming platform restrictions. It covers implementation strategies using dlopen() and code signing to enable modular app extensions while maintaining iOS security, allowing developers to defer library loading and improve startup performance.

Background

- Apple restricts iOS apps from dynamically loading executable code (dlopen, dylibs) — a security rule that also prevents plugin-style architectures common on desktop platforms. - "Lazy loading" here means deferring the loading of a dynamic library until it's actually needed, not doing it at app launch. Common on other OSes, but tightly controlled on iOS. - This article discusses techniques to work around those restrictions (e.g., using Apple's "Allow Arbitrary Loads" entitlements in limited ways, or pre-linking embedded frameworks), likely in the context of the new EU Digital Markets Act (DMA) pressure that is forcing Apple to relax some sideloading and third-party library rules. - The reader should know that iOS historically forbade any runtime code generation or loading not approved at review time — this piece explores whether that wall is finally cracking in 2025.