Repository navigation
[Oztechan/AdTrack#171] Reset iOS premium on reinstall (move premium off Keychain) - #172
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #172 +/- ##
===========================================
- Coverage 63.63% 63.42% -0.21%
===========================================
Files 69 70 +1
Lines 1031 1036 +5
Branches 115 115
===========================================
+ Hits 656 657 +1
- Misses 321 325 +4
Partials 54 54
🚀 New features to boost your workflow:
|
…andbox store Premium moves from the Keychain-backed SecureStorage (shared with auth tokens) to a new PreferenceStorage. On iOS that's NSUserDefaults (wiped on uninstall, unlike the Keychain), so premium resets on reinstall. On Android, PreferenceStorage reuses the existing store — Android already wipes app data on uninstall, so behaviour there is unchanged. Auth tokens stay in the Keychain-backed SecureStorage.
mustafaozhan
force-pushed
the
171/Ads-ios-premium-reset-on-reinstall
branch
from
September 5, 2026 21:21
f2e3fc7 to
f3e3420
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #171. Sub-task of #121.
Problem
On iOS, premium shared the Keychain-backed
SecureStoragewith auth tokens. The Keychain survives app uninstall, so a granted premium window persisted across reinstall — inconsistent with Android, where all app storage is wiped on uninstall.Fix
PreferenceStorage— a sandbox-scoped, uninstall-wiped key/value store, deliberately not Keychain-backed.PremiumManagerImplnow needs this type on both platforms).PremiumManagerImpldepends onPreferenceStorageinstead ofSecureStorage.SecureStorage, so users stay logged in across reinstall.Verified
:common:testDebugUnitTest+:common:detektAllgreen.:common:compileKotlinIosSimulatorArm64green (NSUserDefaults binding resolves).Note: no production users yet, so no in-flight premium windows are affected.