Skip to content

fix(swift): expose hasConsent(method:) as public [NT-3844] - #396

Merged
Felipe Mamud (fmamud) merged 1 commit into
mainfrom
nt-3844/ios-hasconsent-public
Jul 31, 2026
Merged

fix(swift): expose hasConsent(method:) as public [NT-3844]#396
Felipe Mamud (fmamud) merged 1 commit into
mainfrom
nt-3844/ios-hasconsent-public

Conversation

@fmamud

@fmamud Felipe Mamud (fmamud) commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds the missing public modifier to iOS OptimizationClient.hasConsent(method:), restoring parity with Android and RN/Core where the method is already part of the public surface.
  • Adds three public API tests: hasConsent returns false before initialize; returns true for trackView/trackClick/track when consent is accepted; and honors allowedEventTypes selectively when consent is denied.
  • Updates the iOS SDK knowledge base (documentation/internal/sdk-knowledge/native/ios.md) to list hasConsent under the synchronous public API and under the pre-init fallback behavior.

Refs NT-3844.

Test plan

  • pnpm ios:test (requires Xcode — could not run locally on a Command Line Tools-only machine).
  • pnpm format:check clean.
  • git diff --check clean.

🤖 Generated with Claude Code

`OptimizationClient.hasConsent(method:)` was missing the `public` modifier
on iOS, making it effectively `internal` and unreachable from customer app
code. Android and RN/Core already expose it as public; this restores mobile
parity for the GA capabilities matrix.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@fmamud
Felipe Mamud (fmamud) merged commit b4c7207 into main Jul 31, 2026
41 checks passed
@fmamud
Felipe Mamud (fmamud) deleted the nt-3844/ios-hasconsent-public branch July 31, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants