Back
Strapi Swift
An open-source Swift package that simplifies interaction with Strapi REST APIs, powering real-world iOS apps such as Wishflow.
Period
Feb 2025 - Mar 2025
Overview
StrapiSwift is an open-source Swift package that enables structured and type-safe communication with Strapi REST APIs. Built on top of URLRequest and Codable, it provides a clean and native Swift experience for interacting with backend content.
The package supports the default Strapi REST API plugin and focuses on clarity, flexibility and strong typing. It is distributed via Swift Package Manager and maintained publicly on GitHub under the Apache 2.0 license.
Strapi Swift is actively used in the open-source iOS application Wishflow, where it serves as the networking backbone for authentication, content management and media handling. Wishflow functions as a real-world reference implementation of the package in production-like conditions.
Challenge
Working with Strapi from a native iOS application often requires repetitive networking code, manual token handling and custom parsing logic. Developers typically need to configure request headers, manage JWT authentication and map JSON responses into Swift models.
Without abstraction, this results in duplicated logic across projects, inconsistent API handling and increased maintenance overhead. Additionally, handling authentication flows, media uploads and dynamic query parameters can quickly complicate the networking layer.
Solution
StrapiSwift abstracts the complexity of interacting with Strapi by offering a structured API layer with clear modules:
-
Configuration Layer Centralized setup with base URL and token management, including temporary token replacement for one-time requests.
-
Content Manager Full CRUD support for collections and single documents. Supports filtering, sorting, population, field selection, pagination, locale and status parameters.
-
Authentication (Local Provider) Registration, login, profile updates, password changes and retrieval of the current authenticated user. Supports extending custom endpoints.
-
Media Library Fetching files, retrieving single assets, uploading images (via
UIImageor remote URL) and deleting media by ID.
All requests are fully compatible with Swift's async/await system, ensuring modern concurrency support and strong type safety.
Wishflow demonstrates these capabilities in practice by integrating authentication flows, content-driven features and media uploads through Strapi Swift, showcasing its stability and scalability in a complete iOS ecosystem.
Results
Strapi Swift provides:
- A reusable and modular networking layer for Strapi-powered iOS applications
- Reduced boilerplate through strongly typed request and response handling
- Clean separation of concerns between UI and backend communication
- Open-source transparency and community contribution potential
- A production-tested example through the open-source Wishflow app
By combining clear architecture, modern Swift practices and open-source accessibility, Strapi Swift offers a scalable foundation for building Strapi-backed iOS applications.