A lightweight Swift framework for strongly-typed, intuitive access to iOS/macOS app container directories.
AppFolder is a Swift framework that provides a strongly-typed, intuitive API for accessing and organizing directories within an iOS or macOS app's container. It solves the problem of error-prone, string-based path manipulation by offering a declarative way to reference system directories like Documents, Caches, and Application Support, as well as custom user-defined folders.
iOS and macOS developers who need to manage app-specific file storage, particularly those building apps with complex directory structures or shared containers for app extensions.
Developers choose AppFolder for its type-safe design, which reduces bugs and improves code clarity compared to raw Foundation APIs. Its intuitive, hierarchical API mirrors the actual file system, making it easier to reason about where files are stored.
🗂 Never use NSSearchPathForDirectoriesInDomains again
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides strongly-typed objects for system directories like Documents and Caches, eliminating error-prone string-based path construction with APIs like NSSearchPathForDirectoriesInDomains.
Mirrors real-world folder names with properties like AppFolder.Library.Caches, making code declarative and easier to reason about, as shown in the README's usage examples.
Seamlessly integrates with shared containers for app extensions via AppGroupContainer, simplifying data sharing between apps, as demonstrated in the Core Data example.
Allows defining nested directories using Swift inheritance and extensions, with automatic naming from class names, reducing boilerplate code for custom folder structures.
The README disclaimer notes the project is in an early stage, with potential for bugs and breaking changes, making it risky for production-critical applications.
AppFolder only provides a type-safe representation; directories must be manually created using FileManager, adding an extra step compared to full-management frameworks.
Requires capitalized property names and underscores for spaces (e.g., Application_Support), which deviates from standard Swift conventions and can confuse developers.