Skip to content

Reenable offline entitlements#1030

Merged
tonidero merged 3 commits into
mainfrom
reenable-offline-entitlements
May 29, 2023
Merged

Reenable offline entitlements#1030
tonidero merged 3 commits into
mainfrom
reenable-offline-entitlements

Conversation

@tonidero

@tonidero tonidero commented May 29, 2023

Copy link
Copy Markdown
Contributor

Description

This PR reenables offline entitlements and brings back the related integration tests.

Offline entitlements is a feature that allows purchases to still go through even when RC servers have an outage. It uses the information from Google/Amazon available in the device to compute a CustomerInfo offline. This feature has some limitations. For example, it won't work on fresh installs nor when purchasing consumables/inapp products. But it will allow many use cases to work well during outages.

) {

val enableOfflineEntitlements = false
val enableOfflineEntitlements = true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not removing the flag just yet, in case we have to disable it again. Will remove the flag after it's been released.

// }
// }
// }
package com.revenuecat.purchases.offlineentitlements

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no changes in this file, other than uncommenting the tests that were commented when offline entitlements was disabled. Ideally, we should conditionally run these tests depending on the flag, but commenting them out was easier for now.

@tonidero tonidero marked this pull request as ready for review May 29, 2023 10:43
@tonidero tonidero requested a review from a team May 29, 2023 10:43
@codecov

codecov Bot commented May 29, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1030 (f0f967f) into main (30ac5b1) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1030      +/-   ##
==========================================
+ Coverage   85.52%   85.54%   +0.01%     
==========================================
  Files         175      175              
  Lines        6122     6122              
  Branches      857      857              
==========================================
+ Hits         5236     5237       +1     
+ Misses        551      550       -1     
  Partials      335      335              
Impacted Files Coverage Δ
.../java/com/revenuecat/purchases/common/AppConfig.kt 82.60% <100.00%> (+2.17%) ⬆️

@tonidero tonidero merged commit 093fe2d into main May 29, 2023
@tonidero tonidero deleted the reenable-offline-entitlements branch May 29, 2023 15:47
tonidero added a commit that referenced this pull request Jun 1, 2023
**This is an automatic release.**

### New Features
* Offline entitlements support (#1030) via Toni Rico (@tonidero)
### Bugfixes
* Fix billing connection error when querying purchases early in the
process lifetime (#1032) via Toni Rico (@tonidero)
### Performance Improvements
* Perform product entitlement mapping request after more critical
requests (#1017) via Toni Rico (@tonidero)
### Dependency Updates
* Bump fastlane from 2.212.2 to 2.213.0 (#1024) via dependabot[bot]
(@dependabot[bot])
### Other Changes
* Get offerings response from disk cache if available (#1029) via Toni
Rico (@tonidero)
* Improve offline entitlements logs to mention limitations of this mode
(#1039) via Toni Rico (@tonidero)
* Improve error message when backend returns internal error code (#1038)
via Toni Rico (@tonidero)
* PurchaseTester: Add new UI to configure internal proxy behavior
(#1016) via Toni Rico (@tonidero)
* Updated readme to include links to migration guides (#1021) via Marcos
Castany (@mcastany)
* Store offerings response in SharedPreferences (#1028) via Toni Rico
(@tonidero)
* Refactor offerings code out of Purchases (#1027) via Toni Rico
(@tonidero)

---------

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
Co-authored-by: Toni Rico <antonio.rico.diez@revenuecat.com>
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.

2 participants