How mastodon/mastodon-ios works
Project type and purpose
• This is an official iOS client application for the Mastodon social network, written primarily in Swift for UIKit/SwiftUI, with supporting targets (Share Extension, Widget, Siri Intents, Notification Service).
• It bundles its own MastodonSDK module for networking, persistence, and UI components, plus localization tooling, CI/CD scripts, and Fastlane for App Store deployment.
File structure
• Top‐level targets:
• Mastodon (main app)
• MastodonSDK (reusable Swift Package for API, CoreData stack, UI modules)
• MastodonIntent (Siri Intents handler)
• NotificationService (APNS decryption service extension)
• OpenInActionExtension & ShareActionExtension (macOS/iOS share extensions)
• WidgetExtension (WidgetKit variants)
• Key modular directories under each target:
• Sources/CoreDataStack, CoreData models under MastodonSDK
• Sources/MastodonCore for networking/APIService modules
• Sources/MastodonUI for reusable SwiftUI/UICollectionView components
• Mastodon/Scene, /Coordinator, /Protocol, /Diffable for MVVM + Coordinator pattern in the main app
• Configuration, localization, build scripts, and CI definitions appear in .github/, fastlane/, Localization/, crowdin.yml, etc.
Leverage README insights
• Confirms it’s an open‐source iOS application for Mastodon, built with Swift and distributed via the App Store.
• Documentation folder describes setup, deployment, and high‐level architecture (see How-it-works.md).