`entitlementVerificationMode` defaults to `DISABLED` and overrides the native default (`INFORMATIONAL`)
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- android, ios, react-native, typescript
- Domain
- backend-api-design, mobile
Research direction
The issue names dist/purchases.js and the configure option’s JSDoc; start by tracing how entitlementVerificationMode is defaulted and passed to the native SDK. Compare this behavior with the native default described in the issue and choose whether to omit the unset option or default it to INFORMATIONAL. Done means configuring without the option no longer forces verification to DISABLED.
Written by the indexing model from the issue text.
Description
- I have updated Purchases SDK to the latest version
- I have read the Contribution Guidelines
- I have searched the Community
- I have read docs.revenuecat.com
- I have searched for existing Github issues
Describe the bug
Since iOS SDK 5.15.0 and Android SDK 8.11.0, Trusted Entitlements is on by default (informational). The docs say so too.
In react-native-purchases, Purchases.configure sets entitlementVerificationMode to ENTITLEMENT_VERIFICATION_MODE.DISABLED when the app does not pass it. It then sends this value to the native SDK, and the native SDK applies it. So RN apps that do not set the option get verification turned off. Native apps on the same SDK version get it on.
-
Environment
- Platform: iOS and Android
- SDK version: 10.10.0. The same code is in 11.0.1.
- OS version: any
- Xcode/Android Studio version:
- React Native version: 0.86
- SDK installation (CocoaPods + version or manual): CocoaPods, RevenueCat 5.89.0, PurchasesHybridCommon 19.0.0
- How widespread is the issue. Percentage of devices affected: all devices of apps that do not set
entitlementVerificationMode
-
Debug logs that reproduce the issue
-
Steps to reproduce, with a description of expected vs. actual behavior
- Call
Purchases.configure({ apiKey, appUserID })withoutentitlementVerificationMode. - Call
Purchases.getCustomerInfo(). - Read
customerInfo.entitlements.verification.
Expected:
VERIFIED, the same as a native app on iOS 5.15.0+ or Android 8.11.0+.
Actual:NOT_REQUESTED. - Call
-
Other information
- Default in the code:
dist/purchases.js, inconfigure:entitlementVerificationMode = _f === void 0 ? ENTITLEMENT_VERIFICATION_MODE.DISABLED : _f. The JSDoc also says[entitlementVerificationMode=ENTITLEMENT_VERIFICATION_MODE.DISABLED]. - On Android, purchases-hybrid-common applies it in
common.ktwithentitlementVerificationMode(EntitlementVerificationMode.valueOf(verificationMode)). On iOS,Purchases+HybridAdditions.swiftdoes the same with.with(entitlementVerificationMode:). - The option was added in #678 (Nov 2023). The native default was still disabled then.
- The Unity SDK had the same problem and fixed it in RevenueCat/purchases-unity#1018 and RevenueCat/purchases-unity#1108.
- Suggested fix: do not send a value when the app does not set one, so the native default applies. Or change the default to
INFORMATIONAL.
- Default in the code:
Additional context
The setting is easy to miss. Most RN developers will assume they get the native default.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 124
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 69
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RevenueCat/react-native-purchases
-
AdMob: show-time placement override persists after the ad is loaded againPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
RevenueCat/react-native-purchases#2104 ·
Maintainers usually reply within 1 day
-
TypeScript helpers (`__awaiter`, `__generator`, `__createBinding`, …) are inlined in every file of `dist`Possibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
RevenueCat/react-native-purchases#2079 · 1 comment ·
Maintainers usually reply within 1 day
-
presentCustomerCenter throws in preview API mode when callbacks are passedPossibly taken @RaphaelFakhri claimed this 20 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
RevenueCat/react-native-purchases#2050 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
RevenueCat/react-native-purchases#1912 ·
Maintainers usually reply within 1 day
-
presentCustomerCenter never resolves when it can't presentPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 42/100
RevenueCat/react-native-purchases#2098 · 1 comment ·
Maintainers usually reply within 1 day
All issues in RevenueCat/react-native-purchases
Similar issues
-
pending close triaging
Difficulty 1/5 1-3 hours Newbie friendliness 74/100
anomalyco/opencode#63090 · 1 comment ·
Maintainers usually reply within 1 day
-
ai-driven-qa bug claude Cosmetic
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
ai-driven-qa bug claude Minor
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
linagora/twake-mail-admin#609 ·
Maintainers usually reply within 1 day