Conversation
- Ported USAGE.md and REFERENCE.md from URLSession to document Alamofire specifics - Created CHANGELOG.md and seeded with upcoming 3.5.5 release notes - Completely removed the deprecated 'setProceedOnNetworkFailure' API and its logic - Introduced 'ApproovServiceMutator' to allow customizing ApproovService behavior natively - Wired precheck, fetch requests, and interceptors to default mutator fallbacks - Deprecated and removed 'ApproovInterceptorExtensions' - Updated 'ApproovDefaultMessageSigning' to implement 'ApproovServiceMutator' - 'ApproovDefaultMessageSigning' now gracefully skips install message signing instead of throwing if the key is missing
- Replicating React Native functionality, ApproovService can now be configured to put token fetch failure reasons into the token header if no token is fetched - Refactored updateRequestWithApproov execution logic to solve a bug where the ApproovServiceMutator's decision to proceed was overwritten by a legacy hardcoded switch block on the token fetch status
- Introduced enum (.off, .error, .warning, .info, .debug). - Added static function in to configure the global log level. Default is . - Updated all internal statements in and to be conditionally executed based on the current . - Updated with version notes. - Documented logging usage and configuration inside .
ApproovDefaultMessageSigning accesses ApproovService.loggingLevel from a separate file, which requires internal (not private) visibility.
…ring content but type
There was a problem hiding this comment.
Pull request overview
This PR refactors the Approov Alamofire service layer to remove the embedded/binary Approov SDK target, introduce a more general mutator-based customization API, and expand end-user documentation. It also updates packaging metadata (SPM/CocoaPods) to reflect the new integration approach.
Changes:
- Introduces
ApproovServiceMutator(and migrates message signing/customization hooks onto it), plus newApproovLogLevel/logging gating andsetUseApproovStatusIfNoToken. - Updates Swift Package Manager/CocoaPods configuration (adds
approov-ios-sdkas a dependency, removes the prior binary target, renames package/product/module identifiers). - Adds/updates documentation files (
USAGE.md,REFERENCE.md,CHANGELOG.md, README updates).
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| build.log | Adds an Xcode build transcript (currently includes local paths and build failures). |
| USAGE.md | New usage guide focusing on mutators, message signing, and logging/status options. |
| Sources/ApproovSession/ApproovSession.swift | Updates interceptor call site to the new updateRequestWithApproov signature. |
| Sources/ApproovSession/ApproovServiceMutator.swift | Adds the new mutator protocol and default behaviors. |
| Sources/ApproovSession/ApproovService.swift | Implements mutator wiring, logging levels, status-in-token option, and removes proceed-on-network-failure flag. |
| Sources/ApproovSession/ApproovInterceptorExtensions.swift | Deprecates the old interceptor extensions protocol and bridges it to the mutator API. |
| Sources/ApproovSession/ApproovDefaultMessageSigning.swift | Migrates message signing to ApproovServiceMutator and uses configured token header name. |
| REFERENCE.md | New API reference for ApproovService public methods. |
| README.md | Adds SPM import guidance and clarifies primary session type. |
| Package.swift | Renames package/products, removes binary target usage, and adds approov-ios-sdk dependency. |
| Package.resolved | Updates pinned versions (currently missing the new approov-ios-sdk pin). |
| CHANGELOG.md | New changelog describing added/changed/deprecated/removed items for 3.5.5. |
| ApproovSession.podspec | Updates version and sets module name to ApproovAFSession; adds extra dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…all os_log behind loggingLevel - Restore unconditional throws for .noNetwork/.poorNetwork/.mitmDetected in handleInterceptorFetchTokenResult, handleInterceptorHeaderSubstitutionResult, and handleInterceptorQueryParamSubstitutionResult. This fixes a regression introduced when setProceedOnNetworkFailure was removed, which inadvertently allowed requests to proceed without a token on network failure. - Gate all os_log calls in ApproovTrustManager behind ApproovService.loggingLevel so that setLoggingLevel controls all package logging consistently. - Fix logging level guard mismatch in ApproovDefaultMessageSigning (.info -> .error) to match the actual os_log type and gated remaining debug statements. - Make loggingLevel thread-safe with dedicated loggingQueue to prevent data races.
There was a problem hiding this comment.
Pull request overview
This PR refactors the Alamofire service layer to remove the embedded binary SDK target and introduce a more flexible customization surface via ApproovServiceMutator, alongside new logging controls and expanded documentation.
Changes:
- Rename the SwiftPM package/module/product to
ApproovAFSessionand switch to depending onapproov-ios-sdkas a normal SwiftPM dependency (removing the binary target). - Add
ApproovServiceMutatorand updateApproovServiceinterception/signing hooks to flow through the mutator; deprecateApproovInterceptorExtensionscompatibility APIs. - Introduce
ApproovLogLeveland gateos_logcalls across the service (including trust manager and message signing), plus addUSAGE.md/REFERENCE.md/CHANGELOG.md.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| build.log | Adds a local build log artifact (should not be committed). |
| USAGE.md | New usage guide documenting mutators, signing, binding, and logging. |
| Sources/ApproovSession/ApproovTrustManager.swift | Gates pinning logs behind ApproovService.loggingLevel. |
| Sources/ApproovSession/ApproovSession.swift | Updates interceptor call to new updateRequestWithApproov signature. |
| Sources/ApproovSession/ApproovServiceMutator.swift | Adds mutator protocol + default implementation. |
| Sources/ApproovSession/ApproovService.swift | Adds logging level, mutator plumbing, status-as-token option, removes proceed-on-network-fail, updates request processing. |
| Sources/ApproovSession/ApproovInterceptorExtensions.swift | Deprecates old extension protocol and bridges to mutator hook. |
| Sources/ApproovSession/ApproovDefaultMessageSigning.swift | Migrates signing to ApproovServiceMutator, gates logs, uses configured token header. |
| REFERENCE.md | New API reference for ApproovService. |
| README.md | Updates import/module guidance for SwiftPM. |
| Package.swift | Renames package/products/target, adds approov-ios-sdk dependency, removes binary target. |
| Package.resolved | Updates dependency lock versions. |
| CHANGELOG.md | New changelog documenting 3.5.5 changes. |
| ApproovSession.podspec | Bumps version and sets CocoaPods module name to ApproovAFSession; adds dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ov/approov-service-alamofire into feature/merge-remove-binary-target
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 14 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 14 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 14 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 14 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 14 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 14 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.