You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: correct stale versions, paths, links, and API signatures
Audited the markdown against the actual repo contents and fixed the claims
that contradict it. Each item below was verified against Package.swift, the
source, or by resolving the URL.
Version and tooling facts:
- CONTRIBUTING.md said Xcode 13.4 minimum; README.md and AGENTS.md say 16.0,
and 13.4 cannot even parse `swift-tools-version:5.9`.
- CONTRIBUTING.md specified a 100-character line limit; SwiftLint enforces 160.
- CONTRIBUTING.md's Tools section listed only Xcode, omitting the SwiftFormat
0.60.1 / SwiftLint 0.54.0 pins and Fastlane that CI actually requires.
- AGENTS.md said 19 test targets (there are 23) and "60+" workflows (70).
Wrong or dead references:
- AWS SDK for Swift linked to github.com/aws-amplify/aws-sdk-swift; the
correct org is awslabs, per Package.swift.
- Six dead CONTRIBUTING.md TOC anchors (off-by-one step links, a
"Running Cocoapods Locally" entry with no target section).
- Four legacy docs.amplify.aws /lib/...q/platform/ios URLs updated to the
paths they now redirect to.
- bug_report.yaml pointed at the old amplify-ios repo and asked Swift users
for an Amplify CLI log; LogsGuidance.md is about Xcode console output.
- ETHOS.md named a nonexistent AWSStoragePlugin (it is AWSS3StoragePlugin).
- AmplifyTests/CoreTests/README.md described an amplifyconfiguration.json
sample that is not in that directory, and predated amplify_outputs.json.
Corrected code and structure claims:
- AmplifyClients/AGENTS.md: KinesisError.unknown has three associated values,
not two; the initializer is `throws`; `record` is `@discardableResult`; the
User-Agent example double-stamped the version, which UserAgentClientEngine
already injects as lib/amplify-swift#<version>.
- AmplifyClients/AGENTS.md: added the missing AmplifyRecordCache layer (used
by Kinesis and Firehose) and corrected the integration-test layout, which
is not co-located per client.
- AmplifyPlugins/AGENTS.md: unit-test directory names vary by plugin, so the
single stated pattern was wrong for most of them. Also removed
`@visibleForTesting`, which is not a Swift attribute and has zero
occurrences in this codebase.
- Amplify/AGENTS.md: named the two actual DefaultPlugins and resolved the
contradiction about Hub needing no plugin.
- Documented that api-dump/ covers only four modules, and distinguished
api-breaking-changes-detection.yml from api_digester_check.yml.
- Documented that SwiftLint's `included:` scope excludes AmplifyClients/,
AmplifyFoundation/, and AmplifyFoundationBridge/, and that the lint
workflows do not run on pull_request.
- Added the footnote the README's visionOS "Preview*" marker was missing, and
noted visionOS is not declared in Package.swift but inherited from iOS.
- Surfaced the Amazon Pinpoint retirement notice (Oct 30, 2026) in README.md
and AmplifyPlugins/AGENTS.md; previously only the migration guide carried
it while the README still listed Analytics as GA with no caveat.
- Fixed a syntax error in both README-combine-support.md samples
(`search(for "coffee")` was missing its colon) and two LogsGuidance.md typos.
-[`AmplifyPlugins/AGENTS.md`](AmplifyPlugins/AGENTS.md) — Plugin implementations: Auth, API, Storage, DataStore, etc.
16
-
-[`AmplifyClients/AGENTS.md`](AmplifyClients/AGENTS.md) — Standalone clients: Foundation, Bridge, Kinesis (new pattern)
16
+
-[`AmplifyClients/AGENTS.md`](AmplifyClients/AGENTS.md) — Standalone clients: Kinesis, Firehose, Connect, EventEnrichment, plus shared RecordCache (new pattern)
17
17
18
18
## Linting & Formatting (MUST pass)
19
19
20
-
**Always run `swiftformat` on changed files before every commit.** CI enforces both formatting and linting — PRs will fail if files are not formatted. See `.swiftlint.yml` and `.swiftformat` for full rules.
20
+
**Always run `swiftformat` on changed files before every commit.** The SwiftFormat and SwiftLint workflows run on pushes to non-default branches (not on `pull_request`), so format locally rather than relying on a PR check to catch it. See `.swiftlint.yml` and `.swiftformat` for full rules.
21
+
22
+
Note that `.swiftlint.yml` only lints `Amplify/` and `AmplifyPlugins/` — `AmplifyClients/`, `AmplifyFoundation/`, and `AmplifyFoundationBridge/` are outside SwiftLint's `included:` scope, though SwiftFormat covers the whole repo.
21
23
22
24
```bash
23
25
swiftformat <changed-files># Format changed files before committing
No period at end. One feature/bugfix per PR. Reference issues: `fixes #<issue>`.
90
92
@@ -95,7 +97,7 @@ swift test # All unit tests
95
97
swift test --filter AWSCognitoAuthPluginUnitTests # Specific target
96
98
```
97
99
98
-
-**Unit tests**: XCTest, defined in Package.swift (19 test targets)
100
+
-**Unit tests**: XCTest, defined in Package.swift (23 test targets)
99
101
-**Integration tests**: Xcode host app projects under `AmplifyPlugins/<Category>/Tests/<Category>HostApp/`
100
102
-**Conventions**: Mock via behavior protocols, use `AmplifyTestCommon` for shared utilities, `AmplifyAsyncTesting` for async helpers
101
103
-**Test documentation**: Use Given/When/Then doc comments on all test methods:
@@ -114,11 +116,11 @@ swift test --filter AWSCognitoAuthPluginUnitTests # Specific target
114
116
115
117
## Semver
116
118
117
-
New enum cases = **minor** bump. Breaking API changes = **major** (rare, needs approval). API surface tracked via `api-dump/` JSON snapshots and CI checks.
119
+
New enum cases = **minor** bump. Breaking API changes = **major** (rare, needs approval). API surface tracked via `api-dump/` JSON snapshots and CI checks, currently covering four modules only: `Amplify`, `AWSPluginsCore`, `AWSDataStorePlugin`, and `CoreMLPredictionsPlugin`.
118
120
119
121
## CI/CD
120
122
121
-
60+ GitHub Actions workflows in `.github/workflows/`: per-category unit tests (`unit_test_*.yml`), integration tests (`integ_test_*.yml`), platform builds, SwiftLint/SwiftFormat checks, API digester, CodeQL, Fortify. Releases via Fastlane.
123
+
70 GitHub Actions workflows in `.github/workflows/`: per-category unit tests (`unit_test_*.yml`), integration tests (`integ_test_*.yml`), platform builds, SwiftLint/SwiftFormat checks, API digester, CodeQL, Fortify. Releases via Fastlane.
├── DefaultPlugins/ # AWSHubPlugin and AWSUnifiedLoggingPlugin (registered automatically)
51
51
└── DevMenu/ # Developer debug menu
52
52
```
53
53
@@ -107,7 +107,7 @@ let token = Amplify.Hub.listen(to: .auth) { payload in ... }
107
107
108
108
## API Surface Stability
109
109
110
-
API dumps in `api-dump/*.json` track the public surface. Breaking changes detected by CI (`api_digester_check.yml`). New enum cases = minor bump; removing/renaming public APIs = major bump (needs approval).
110
+
API dumps in `api-dump/*.json` track the public surface of four modules (`Amplify`, `AWSPluginsCore`, `AWSDataStorePlugin`, `CoreMLPredictionsPlugin`). Breaking changes detected by CI (`api-breaking-changes-detection.yml`; `api_digester_check.yml` separately verifies the digester tool itself against the `api-dump-test/` fixtures). New enum cases = minor bump; removing/renaming public APIs = major bump (needs approval).
Integration tests are not co-located per client. `AmplifyConnectClient` has its own host app under `Tests/ConnectClientHostApp/`, Kinesis and Firehose share `AmplifyClients/Tests/IntegrationTests/KinesisFirehoseClientHostApp/`, and `AmplifyEventEnrichmentClient` has unit tests only.
Do not append the version here — `UserAgentClientEngine` already injects `lib/amplify-swift#<version>`, so adding `AmplifyMetadata.version` to the `md/` segment stamps it twice.
|`Core/`|`AWSPluginsCore`, `InternalAmplifyCredentials`| Shared plugin infra | Core |
22
+
|`Core/`|`AWSPluginsCore`, `InternalAmplifyCredentials`, `AWSPluginsTestCommon`| Shared plugin infra (and shared test utilities) | Core |
23
+
24
+
> **Amazon Pinpoint retirement** — Pinpoint is scheduled to be retired on October 30, 2026. This affects `AWSPinpointAnalyticsPlugin`, `AWSPinpointPushNotificationsPlugin`, and `InternalAWSPinpoint`.
23
25
24
26
## Plugin File Organization
25
27
@@ -46,7 +48,7 @@ Every plugin follows an extension-based pattern:
46
48
- Constructor-based with optional parameters and defaults
47
49
- Services injected during `configure(using:)` phase
48
50
- Behavior protocols abstract AWS service calls (e.g., `AWSAuthCredentialsProviderBehavior`)
49
-
-`@visibleForTesting` for test-only injection points
51
+
-Test-only injection points are exposed via `internal` access plus `@testable import` — there is no `@visibleForTesting` attribute in Swift
50
52
51
53
## Logging
52
54
@@ -63,7 +65,7 @@ extension AWSAPIPlugin {
63
65
64
66
## Testing
65
67
66
-
**Unit tests**: `AmplifyPlugins/<Category>/Tests/<PluginName>UnitTests/` (SPM test targets)
68
+
**Unit tests**: SPM test targets under `AmplifyPlugins/<Category>/Tests/`. Naming varies — most are `<PluginName>Tests` (e.g. `AWSAPIPluginTests`, `AWSS3StoragePluginTests`), Auth/Analytics/Predictions/Push use a `UnitTests` suffix (e.g. `AWSCognitoAuthPluginUnitTests`), and DataStore is `AWSDataStoreCategoryPluginTests`. Core's live at `AmplifyPlugins/Core/AWSPluginsCoreTests` and `AmplifyPlugins/Core/AmplifyCredentialsTests`. Check `Package.swift` for the exact target name.
67
69
68
70
**Integration tests**: `AmplifyPlugins/<Category>/Tests/<Category>HostApp/` (Xcode projects) — require AWS credentials and provisioned backends. Multiple test plan variants per category (Gen1, Gen2, auth modes, etc.).
Amplify allows for configuration from either an in-memory `AmplifyConfiguration` object, or from an `amplifyconfiguration.json` file (which simply deserializes
4
-
into an `AmplifyConfiguration` object.
3
+
Amplify supports configuration from an in-memory `AmplifyConfiguration` object, from an
4
+
`amplifyconfiguration.json` file (Gen1, which deserializes into an `AmplifyConfiguration`),
5
+
or from an `amplify_outputs.json` file (Gen2, which deserializes into `AmplifyOutputsData`).
5
6
6
-
As we add new categories, we will add new stanzas to the sample `amplifyconfiguration.json` file in this directory, to ensure compatibility.
7
+
Test fixtures live alongside the tests rather than in this directory — see
8
+
`AmplifyConfigurationInitializationTests.swift` and `AmplifyOutputsInitializationTests.swift`.
9
+
As we add new categories, extend the fixtures in those tests to ensure compatibility.
0 commit comments