Skip to content

feat(privacy): add the refundHandling data processing purpose - #162

Draft
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/mob-581-flutter-add-the-refundhandling-data-processing-purpose
Draft

devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/mob-581-flutter-add-the-refundhandling-data-processing-purpose

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 17, 2026

Copy link
Copy Markdown

Description

Adds PLYDataProcessingPurpose.refundHandling (MOB-581), mirroring Purchasely-iOS-Sources#804. Dart → bridge token is REFUND_HANDLING (same SCREAMING_SNAKE convention as the others); the native SDK emits "refund-handling" in X-PRIVACY-CONSENT-REVOKED-FEATURES. Not part of allNonEssentials, no behaviour beyond carrying the flag. Android bridge untouched — its when drops the unknown token.

Also fixes a pre-existing iOS bridge bug: ALL_NON_ESSENTIALS short-circuited to [.allNonEssentials] and silently dropped any other purpose passed alongside (e.g. identifiedAnalytics, now refundHandling). The switch is now a plain compactMap including ALL_NON_ESSENTIALS; the native manager unions the façades.

-let purposes = if purposesArg.contains("ALL_NON_ESSENTIALS") { Set([.allNonEssentials]) } else { Set(purposesArg.compactMap { ... }) }
+let purposes = Set(purposesArg.compactMap {
+    case "ALL_NON_ESSENTIALS": .allNonEssentials
+    ...
+    case "REFUND_HANDLING": .refundHandling

Dartdoc on revokeDataProcessingConsent documents the replace-set semantics (call replaces the stored set, [] grants everything back, allNonEssentials excludes identifiedAnalytics/refundHandling).

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📦 SDK Version Update (updating native SDK dependencies)
  • 📚 Documentation update
  • 🔧 Configuration/CI change

Testing

  • iOS example app builds successfully (flutter build ios --simulator) — see notes
  • Android example app builds successfully (flutter build apk) — not touched
  • Unit tests pass (flutter test), plus flutter analyze and dart format --set-exit-if-changed .
  • Manually tested on iOS simulator/device
  • Manually tested on Android emulator/device

Local iOS verification against the Sources repo (PR #804 branch, i.e. develop + refundHandling): the full SwiftPM flutter build ios --simulator run resolved the local Purchasely package but aborted before compiling because this machine has no iOS 26.5 simulator runtime installed. As a substitute, the bridge's revokeDataProcessingConsent mapping (including case "REFUND_HANDLING": .refundHandling) was compiled in a scratch SwiftPM package importing the local Purchasely product (Mac Catalyst destination): ** BUILD SUCCEEDED **. So the Swift change compiles against the 6.2.0 API; the full plugin build will be exercised by CI once the pin is bumped.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code where necessary
  • I have updated the documentation accordingly
  • My changes generate no new warnings
  • All CI checks pass

Related Issues

MOB-581

Additional Notes

Draft until Purchasely iOS 6.2.0 ships. .refundHandling does not exist in the pinned 6.1.0, so ios-unit-tests, build-ios and build-ios-swiftpm are expected to fail on this PR. Before merging: bump purchasely/ios/purchasely_flutter.podspec + purchasely/ios/purchasely_flutter/Package.swift to 6.2.0 and add the VERSIONS.md row.

No native RunnerTests added: SwiftPurchaselyFlutterPluginTests.swift has no helper to drive handle(_:result:) and the private method isn't reachable otherwise.

Link to Devin session: https://app.devin.ai/sessions/af425686f98f4560a674a8e5f60cce47
Open in Devin Desktop: https://app.devin.ai/desktop/session/af425686f98f4560a674a8e5f60cce47?variant=devin
Requested by: @kherembourg

kherembourg and others added 2 commits September 17, 2026 07:01
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

This branch has not been deployed

No deployments
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.

1 participant