How aws-amplify/amplify-swift works
Amplify Swift is a pluggable client library that exposes cloud capabilities through category APIs and provider plugins. The principal workflow is an app calling a category on Amplify, which delegates work through that category’s plugin behavior and returns results or ongoing tasks. DataStore adds local model persistence and synchronization; other categories cover identity, object storage, APIs, analytics, location, machine-learning tasks, and push notifications. The README documents these capabilities and the plugin model; sampled implementation excerpts are limited, so provider-level wiring is shown only where supported.
Main entry points: Amplify.swift Amplify Facade · DataStoreCategory.swift DataStore · HubCategory.swift Hub Events · APICategory.swift API
Components 19
Core and Events
- Amplify Facade
Amplify/Amplify.swift - Hub Events
Amplify/Categories/Hub/HubCategory.swift - Logging
Amplify/Categories/Logging/LoggingCategory.swift
Data APIs
- API
Amplify/Categories/API/APICategory.swift - DataStore
Amplify/Categories/DataStore/DataStoreCategory.swift - Models and Queries
Amplify/Categories/DataStore/Model/Model.swift - Local Persistence
AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Storage/StorageEngine.swift - Remote Sync
AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/RemoteSyncEngine+AuthModeStrategyDelegate.swift
Identity and Storage
- Authentication
Amplify/Categories/Auth/AuthCategory.swift - Object Storage
Amplify/Categories/Storage/StorageCategory.swift - Storage Operations
Amplify/Categories/Storage/StorageCategoryBehavior.swift - S3 Provider
AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/AWSS3StoragePlugin+AsyncClientBehavior.swift
App Services
- Analytics
Amplify/Categories/Analytics/AnalyticsCategory.swift - Geo and Maps
Amplify/Categories/Geo/GeoCategory.swift - Push Notifications
Amplify/Categories/Notifications/PushNotifications/PushNotificationsCategory.swift
Intelligence
- Predictions
Amplify/Categories/Predictions/PredictionsCategory.swift - ML Requests
Amplify/Categories/Predictions/Request/Identify/Identify.swift
Other components
- Application
- Cloud Providers
Connections 28
- Application → Amplify Facade: calls
- Amplify Facade → API: routes to
- Amplify Facade → DataStore: routes to
- Amplify Facade → Authentication: routes to
- Amplify Facade → Object Storage: routes to
- Amplify Facade → Analytics: routes to
- Amplify Facade → Geo and Maps: routes to
- Amplify Facade → Push Notifications: routes to
- Amplify Facade → Predictions: routes to
- DataStore → Models and Queries: queries and mutates
- DataStore → Local Persistence: persists locally
- DataStore → Remote Sync: synchronizes remotely
- Remote Sync → Authentication: checks identity
- Object Storage → Storage Operations: exposes operations
- Storage Operations → S3 Provider: implemented by
- S3 Provider → Cloud Providers: transfers objects
- API → Cloud Providers: connects to services
- Authentication → Cloud Providers: authenticates with
- Analytics → Cloud Providers: sends events
- Geo and Maps → Cloud Providers: queries location
- Push Notifications → Cloud Providers: integrates with
- Predictions → ML Requests: accepts requests
- ML Requests → Cloud Providers: invokes ML services
- API → Hub Events: dispatches events
- Object Storage → Hub Events: dispatches events
- Analytics → Hub Events: publishes events
- DataStore → Hub Events: publishes events
- Amplify Facade → Logging: provides logging