From 8416c1671faf3282444e1cab58f6fdddb06bda5f Mon Sep 17 00:00:00 2001 From: Drew Hudec Date: Wed, 18 Mar 2026 18:17:09 -0400 Subject: [PATCH 1/5] chore(ENG-10153): add CLAUDE.md and clean up legacy agentic artifacts Co-Authored-By: Claude Opus 4.6 (1M context) --- .claude/CLAUDE.md | 32 ++++++++++++++++++++++++++++++++ .gitignore | 3 +++ 2 files changed, 35 insertions(+) create mode 100644 .claude/CLAUDE.md diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md new file mode 100644 index 0000000..d9f7935 --- /dev/null +++ b/.claude/CLAUDE.md @@ -0,0 +1,32 @@ +# iOS Elements + +iOS SDK for Basis Theory Elements — Swift library providing secure UI components for collecting sensitive data. + +## Development Workflow + +```bash +swift build # Build the package +``` + +Also available as a CocoaPod (`BasisTheoryElements.podspec`). + +## Testing + +```bash +swift test # Run unit tests +``` + +Integration tests are in `IntegrationTester/` — run via Xcode. + +## Feedback Loops + +Run `swift test` for fast feedback. When a failing test is discovered, always verify it passes before considering the fix complete. + +## Standards & Conventions + +- Swift, Swift Package Manager + CocoaPods +- Library source in `BasisTheoryElements/` + +## Links + +- [Elements docs](https://developers.basistheory.com/docs/sdks/mobile/ios/) diff --git a/.gitignore b/.gitignore index 60f6c2d..24f3624 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ DerivedData/ IntegrationTester/Env.plist **/.build .idea/ + +# IDE +.cursor From 22e0395291b58615239bfe33de5e0d5f25ba5c3c Mon Sep 17 00:00:00 2001 From: Drew Hudec Date: Wed, 18 Mar 2026 23:42:54 -0400 Subject: [PATCH 2/5] fix(ENG-10153): move CLAUDE.md to repo root for discoverability Co-Authored-By: Claude Opus 4.6 (1M context) --- .claude/CLAUDE.md => CLAUDE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .claude/CLAUDE.md => CLAUDE.md (100%) diff --git a/.claude/CLAUDE.md b/CLAUDE.md similarity index 100% rename from .claude/CLAUDE.md rename to CLAUDE.md From 4d9665184d50cc8145049e9b368e4036f45a77d6 Mon Sep 17 00:00:00 2001 From: Drew Hudec Date: Wed, 18 Mar 2026 23:56:19 -0400 Subject: [PATCH 3/5] =?UTF-8?q?fix(ENG-10153):=20revert=20.gitignore=20cha?= =?UTF-8?q?nges=20=E2=80=94=20.cursor=20belongs=20in=20global=20gitignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index 24f3624..60f6c2d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,3 @@ DerivedData/ IntegrationTester/Env.plist **/.build .idea/ - -# IDE -.cursor From 4bc33ab0029dcbbff3d38c435635c8564cd4a128 Mon Sep 17 00:00:00 2001 From: Drew Hudec Date: Thu, 19 Mar 2026 09:44:15 -0400 Subject: [PATCH 4/5] refactor(ENG-10153): rewrite CLAUDE.md with repo-specific gotchas and architecture Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index d9f7935..9b644a1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,32 +1,37 @@ # iOS Elements -iOS SDK for Basis Theory Elements — Swift library providing secure UI components for collecting sensitive data. +Swift SDK providing secure UI components for collecting sensitive data on iOS. -## Development Workflow +## Build & Test ```bash -swift build # Build the package +swift build # Build via SPM +swift test # Unit tests (SPM — but see note below) ``` -Also available as a CocoaPod (`BasisTheoryElements.podspec`). +## Project Structure -## Testing +- `BasisTheoryElements/Sources/BasisTheoryElements/` — Library source (all `.swift` files) +- `IntegrationTester/UnitTests/` — Unit tests (Xcode project, NOT SPM test target) +- `IntegrationTester/AcceptanceTests/` — Acceptance tests (require API key + Xcode) +- `Package.swift` — SPM package definition (no test targets defined here) +- `BasisTheoryElements.podspec` — CocoaPods spec -```bash -swift test # Run unit tests -``` - -Integration tests are in `IntegrationTester/` — run via Xcode. - -## Feedback Loops +## Gotchas -Run `swift test` for fast feedback. When a failing test is discovered, always verify it passes before considering the fix complete. +- **No SPM test target**: `Package.swift` does NOT define test targets. Unit tests are in `IntegrationTester/IntegrationTester.xcodeproj` — run via Xcode, not `swift test`. +- **Dual distribution**: SPM (`Package.swift`) + CocoaPods (`BasisTheoryElements.podspec`). Both must stay in sync. +- **CocoaPods has a different dependency**: Podspec depends on `BasisTheory` pod (v0.6.1), while SPM depends on `AnyCodable`. The CocoaPods build uses `COCOAPODS=1` preprocessor flag. +- **Version in 3 places**: CI updates version in `BasisTheoryElements.podspec` (s.version + :tag), and `BasisTheoryElements.swift` (`public static let version`). All three must match. +- **iOS 15+ minimum**: `platforms: [.iOS(.v15)]` +- **Swift 5.5** +- **Integration tests need config**: `IntegrationTester/Env.plist.example` shows required environment setup. +- **Resource bundles**: Podspec includes `Assets.xcassets` — don't move or rename the Resources directory. -## Standards & Conventions +## Release -- Swift, Swift Package Manager + CocoaPods -- Library source in `BasisTheoryElements/` +Automated on push to `master`. CI bumps version tag, updates podspec + `BasisTheoryElements.swift` version + CHANGELOG, then runs `pod trunk push --allow-warnings`. -## Links +## Docs -- [Elements docs](https://developers.basistheory.com/docs/sdks/mobile/ios/) +- [iOS Elements SDK](https://developers.basistheory.com/docs/sdks/mobile/ios/) From 3bad541735919006f579de386839590422050c1f Mon Sep 17 00:00:00 2001 From: Drew Hudec Date: Thu, 19 Mar 2026 12:18:53 -0400 Subject: [PATCH 5/5] refactor(ENG-10153): rename to AGENTS.md for model-agnostic tooling, source from CLAUDE.md Co-Authored-By: Claude Opus 4.6 (1M context) --- AGENTS.md | 37 +++++++++++++++++++++++++++++++++++++ CLAUDE.md | 38 +------------------------------------- 2 files changed, 38 insertions(+), 37 deletions(-) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..9b644a1 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,37 @@ +# iOS Elements + +Swift SDK providing secure UI components for collecting sensitive data on iOS. + +## Build & Test + +```bash +swift build # Build via SPM +swift test # Unit tests (SPM — but see note below) +``` + +## Project Structure + +- `BasisTheoryElements/Sources/BasisTheoryElements/` — Library source (all `.swift` files) +- `IntegrationTester/UnitTests/` — Unit tests (Xcode project, NOT SPM test target) +- `IntegrationTester/AcceptanceTests/` — Acceptance tests (require API key + Xcode) +- `Package.swift` — SPM package definition (no test targets defined here) +- `BasisTheoryElements.podspec` — CocoaPods spec + +## Gotchas + +- **No SPM test target**: `Package.swift` does NOT define test targets. Unit tests are in `IntegrationTester/IntegrationTester.xcodeproj` — run via Xcode, not `swift test`. +- **Dual distribution**: SPM (`Package.swift`) + CocoaPods (`BasisTheoryElements.podspec`). Both must stay in sync. +- **CocoaPods has a different dependency**: Podspec depends on `BasisTheory` pod (v0.6.1), while SPM depends on `AnyCodable`. The CocoaPods build uses `COCOAPODS=1` preprocessor flag. +- **Version in 3 places**: CI updates version in `BasisTheoryElements.podspec` (s.version + :tag), and `BasisTheoryElements.swift` (`public static let version`). All three must match. +- **iOS 15+ minimum**: `platforms: [.iOS(.v15)]` +- **Swift 5.5** +- **Integration tests need config**: `IntegrationTester/Env.plist.example` shows required environment setup. +- **Resource bundles**: Podspec includes `Assets.xcassets` — don't move or rename the Resources directory. + +## Release + +Automated on push to `master`. CI bumps version tag, updates podspec + `BasisTheoryElements.swift` version + CHANGELOG, then runs `pod trunk push --allow-warnings`. + +## Docs + +- [iOS Elements SDK](https://developers.basistheory.com/docs/sdks/mobile/ios/) diff --git a/CLAUDE.md b/CLAUDE.md index 9b644a1..43c994c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,37 +1 @@ -# iOS Elements - -Swift SDK providing secure UI components for collecting sensitive data on iOS. - -## Build & Test - -```bash -swift build # Build via SPM -swift test # Unit tests (SPM — but see note below) -``` - -## Project Structure - -- `BasisTheoryElements/Sources/BasisTheoryElements/` — Library source (all `.swift` files) -- `IntegrationTester/UnitTests/` — Unit tests (Xcode project, NOT SPM test target) -- `IntegrationTester/AcceptanceTests/` — Acceptance tests (require API key + Xcode) -- `Package.swift` — SPM package definition (no test targets defined here) -- `BasisTheoryElements.podspec` — CocoaPods spec - -## Gotchas - -- **No SPM test target**: `Package.swift` does NOT define test targets. Unit tests are in `IntegrationTester/IntegrationTester.xcodeproj` — run via Xcode, not `swift test`. -- **Dual distribution**: SPM (`Package.swift`) + CocoaPods (`BasisTheoryElements.podspec`). Both must stay in sync. -- **CocoaPods has a different dependency**: Podspec depends on `BasisTheory` pod (v0.6.1), while SPM depends on `AnyCodable`. The CocoaPods build uses `COCOAPODS=1` preprocessor flag. -- **Version in 3 places**: CI updates version in `BasisTheoryElements.podspec` (s.version + :tag), and `BasisTheoryElements.swift` (`public static let version`). All three must match. -- **iOS 15+ minimum**: `platforms: [.iOS(.v15)]` -- **Swift 5.5** -- **Integration tests need config**: `IntegrationTester/Env.plist.example` shows required environment setup. -- **Resource bundles**: Podspec includes `Assets.xcassets` — don't move or rename the Resources directory. - -## Release - -Automated on push to `master`. CI bumps version tag, updates podspec + `BasisTheoryElements.swift` version + CHANGELOG, then runs `pod trunk push --allow-warnings`. - -## Docs - -- [iOS Elements SDK](https://developers.basistheory.com/docs/sdks/mobile/ios/) +@AGENTS.md