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.
# 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# 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 buildIndividual 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
The SDK is organized into multiple modular frameworks:
Core Modules:
FRCore: Foundation layer with common utilities, networking, logging, keychain managementFRAuth: Main authentication module with OIDC client, Journey integration, WebAuthn, OAuth2FRAuthenticator: Multi-factor authentication with TOTP and Push notifications
Add-on Modules:
FRDeviceBinding: Device binding capabilities with cryptographic key pairsFRProximity: Location and BLE proximity featuresFRCaptchaEnterprise: Google reCAPTCHA Enterprise integrationPingProtect: Ping Protect fraud detection integration
Social Login Modules:
FRGoogleSignIn: Google Sign-In integrationFRFacebookSignIn: Facebook Login integration
UI Module (Deprecated):
FRUI: Pre-built UI components for Journey integration
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
The project supports both CocoaPods and Swift Package Manager:
- CocoaPods: Individual
.podspecfiles for each module - SPM: Centralized
Package.swiftwith all module definitions - Dependencies managed through Package.swift (JOSESwift, Facebook SDK, Google Sign-In, etc.)
- All tests are consolidated under
FRTestHostscheme - Unit tests located in each module's
Testsdirectory - E2E tests in
e2e/directory with sample app - Tests use XCTest framework
- Test configuration files in
FRTestHost/FRTestHost/SharedTestFiles/TestConfig/
- iOS 13.0+ deployment target
- Swift 5.0+
- Xcode 16.2+ for builds
- Supports both Swift Package Manager and CocoaPods integration
master: Main production branchdevelop: Development branch for integration- Create feature branches from
develop - PRs should target
developbranch
The project uses GitHub Actions for CI with:
- Automated builds and tests on PR/push
- Device farm testing with BrowserStack
- Slack notifications for build status
- Security scanning with Mend CLI