-
Notifications
You must be signed in to change notification settings - Fork 34
SDKS-5034 Add tool-agnostic AGENTS.md and CLAUDE.md redirect to forgerock-ios-sdk #380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,3 +73,4 @@ fastlane/report.xml | |
| fastlane/Preview.html | ||
| fastlane/screenshots/**/*.png | ||
| fastlane/test_output | ||
| .sdk/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| # AGENTS.md | ||
|
|
||
| This file provides guidance to AI coding agents (Claude Code, Cursor, GitHub Copilot, Gemini, etc.) when working with code in this repository. It follows the open AGENTS.md convention. | ||
|
|
||
| > **Note:** CLAUDE.md in this repository is a one-line redirect to AGENTS.md. Edit AGENTS.md only. | ||
|
|
||
| ## Development Commands | ||
|
|
||
| ### Building and Testing | ||
| ```bash | ||
| # Run all tests (unit tests) | ||
| xcodebuild test \ | ||
| -scheme FRTestHost \ | ||
| -workspace e2e/FRExample.xcworkspace \ | ||
| -configuration Debug \ | ||
| -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.2' \ | ||
| -derivedDataPath DerivedData \ | ||
| TEST_TARGET_SIGNING=YES \ | ||
| -enableCodeCoverage YES \ | ||
| -resultBundlePath TestResults | ||
|
|
||
| # Build for iOS Simulator (example destination) | ||
| xcodebuild build \ | ||
| -scheme FRTestHost \ | ||
| -workspace e2e/FRExample.xcworkspace \ | ||
| -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.2' | ||
|
|
||
| # Open the project in Xcode | ||
| open e2e/FRExample.xcworkspace | ||
| ``` | ||
|
|
||
| ### Validation and Linting | ||
| ```bash | ||
| # Validate podspec files | ||
| pod lib lint FRAuth.podspec | ||
| pod lib lint FRCore.podspec | ||
| # (Repeat for other modules: FRAuthenticator, FRDeviceBinding, FRUI, etc.) | ||
|
|
||
| # Swift Package Manager validation | ||
| swift build | ||
| ``` | ||
|
|
||
| ### Module Testing | ||
| Individual modules can be tested by changing the scheme in the xcodebuild command: | ||
| - FRTestHost (contains all tests) | ||
| - Individual module tests are bundled within the FRTestHost scheme | ||
|
|
||
| ## Architecture Overview | ||
|
|
||
| ### Module Structure | ||
| The SDK is organized into multiple modular frameworks: | ||
|
|
||
| **Core Modules:** | ||
| - `FRCore`: Foundation layer with common utilities, networking, logging, keychain management | ||
| - `FRAuth`: Main authentication module with OIDC client, Journey integration, WebAuthn, OAuth2 | ||
| - `FRAuthenticator`: Multi-factor authentication with TOTP and Push notifications | ||
|
|
||
| **Add-on Modules:** | ||
| - `FRDeviceBinding`: Device binding capabilities with cryptographic key pairs | ||
| - `FRProximity`: Location and BLE proximity features | ||
| - `FRCaptchaEnterprise`: Google reCAPTCHA Enterprise integration | ||
| - `PingProtect`: Ping Protect fraud detection integration | ||
|
|
||
| **Social Login Modules:** | ||
| - `FRGoogleSignIn`: Google Sign-In integration | ||
| - `FRFacebookSignIn`: Facebook Login integration | ||
|
|
||
| **UI Module (Deprecated):** | ||
| - `FRUI`: Pre-built UI components for Journey integration | ||
|
|
||
| ### Key Directory Structure | ||
| ``` | ||
| FRCore/FRCore/ | ||
| ├── Authenticator/ # Certificate and key management | ||
| ├── Error/ # Error handling | ||
| ├── Keychain/ # Secure storage | ||
| ├── Log/ # Logging framework | ||
| ├── Network/ # HTTP client and networking | ||
|
|
||
| FRAuth/FRAuth/ | ||
| ├── AppIntegrity/ # App attestation | ||
| ├── Authentication/ # Auth flows and session management | ||
| ├── Authorization/ # OAuth2 and policy handling | ||
| ├── Callbacks/ # Journey callback implementations | ||
| ├── Device/ # Device profiling and collection | ||
| ├── WebAuthn/ # WebAuthn authentication | ||
| ``` | ||
|
|
||
| ### Package Management | ||
| The project supports both CocoaPods and Swift Package Manager: | ||
| - CocoaPods: Individual `.podspec` files for each module | ||
| - SPM: Centralized `Package.swift` with all module definitions | ||
| - Dependencies managed through Package.swift (JOSESwift, Facebook SDK, Google Sign-In, etc.) | ||
|
|
||
| ### Testing Structure | ||
| - All tests are consolidated under `FRTestHost` scheme | ||
| - Unit tests located in each module's `Tests` directory | ||
| - E2E tests in `e2e/` directory with sample app | ||
| - Tests use XCTest framework | ||
| - Test configuration files in `FRTestHost/FRTestHost/SharedTestFiles/TestConfig/` | ||
|
|
||
| ### Platform Requirements | ||
| - iOS 12.0+ deployment target | ||
| - Swift 5.0+ | ||
| - Xcode 16.2+ for builds | ||
| - Supports both Swift Package Manager and CocoaPods integration | ||
|
|
||
| ## Development Notes | ||
|
|
||
| ### Branch Strategy | ||
| - `master`: Main production branch | ||
| - `develop`: Development branch for integration | ||
| - Create feature branches from `develop` | ||
| - PRs should target `develop` branch | ||
|
|
||
| ### CI/CD | ||
| The project uses GitHub Actions for CI with: | ||
| - Automated builds and tests on PR/push | ||
| - Device farm testing with BitBar | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is actually outdated - replace with |
||
| - Slack notifications for build status | ||
| - Security scanning with Mend CLI | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| See AGENTS.md. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can double check, but apparently this wouldn't work. you need to use the file reference like this |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iOS 13+