Add App Store purchase restriction methods#21
Open
NoodleOfDeath wants to merge 3 commits into
Open
Conversation
Expose deny/allow controls for in-app purchases and a setter for requiring a password for purchases, mapping to the iOS ManagedSettings appStore properties (denyInAppPurchases, requirePasswordForPurchases). The current values remain readable via getStore(). - iOS: write store.appStore.denyInAppPurchases / requirePasswordForPurchases - Android: persist flag state via SharedPreferences (no OS-level enforcement available for a regular app) - Document the new methods and note iOS-only enforcement in the README Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Apple's AppStoreSettings only exposes denyInAppPurchases and requirePasswordForPurchases (both Bool?), with no allow* counterpart. - denyInAppPurchases now takes a boolean matching the iOS property - allowInAppPurchases is deprecated (kept as a backwards-compatible alias for denyInAppPurchases(false)) - Document in JSDoc and JavaDoc that in-app purchase blocking and password-for-purchase are not supported on Android (no OS-level API) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Apple's ApplicationSettings exposes denyAppInstallation and denyAppRemoval (both Bool?) with no allow* counterpart, mirroring the AppStoreSettings change. - denyAppInstallation / denyAppRemoval now take a boolean matching the iOS properties - allowAppInstallation / allowAppRemoval are deprecated (kept as backwards-compatible aliases for deny*(false)) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Expose deny/allow controls for in-app purchases and a setter for requiring a password for purchases, mapping to the iOS ManagedSettings appStore properties (denyInAppPurchases, requirePasswordForPurchases). The current values remain readable via getStore().