Commit Graph
7 Commits
Author SHA1 Message Date
NachoSoto d65ebbba2a Custom Entitlement Computation: added missing scheme to project (#2579) 2023-06-05 08:01:31 -07:00
Andy Boedo 9abf17227c updated example code for the sample app for Custom Entitlements (#2454)
Updated example code based on latest usage
2023-04-27 14:10:08 -03:00
NachoSotoandToni Rico 4a74d33f84 Custom Entitlement Computation: disabled unnecessary APIs (#2442)
## Disabled API:

- `getCustomerInfo`
- `logIn`
- `logOut`
- `Purchases.attribution`
- `syncPurchases`
- `restorePurchases`
- Trial eligibility
- Promotional purchases
- `async` counterparts

---------

Co-authored-by: Toni Rico <antonio.rico.diez@revenuecat.com>
2023-04-26 14:51:40 -03:00
NachoSoto d65caf72b3 Custom Entitlement Computation: avoid getCustomerInfo requests for cancelled purchases (#2449)
Fixes SDK-3088
Supersedes #2447

Thanks to @tonidero for doing most of this.

Note that it's currently impossible to test this for SK2, so we only
have SK1 tests (we have a Radar for that).

The next step will be to deprecate the current API to remove the
`userCancelled` property and make this the new behavior.
See also #1910 for an explanation of the different return values of the
purchase APIs.
2023-04-26 09:53:22 -07:00
Andy Boedo f7ef9f3a80 customEntitlementsComputation: update the copy in the sample app to explain the new usage (#2443)
Updated the copy in the sample app to explain the new usage
2023-04-25 23:23:18 -07:00
NachoSoto 64c8638425 Create separate SPM library to enable custom entitlement computation (#2440)
Fixes SDK-3084

![screenshot_2023-04-25_at_10 02
44_480](https://user-images.githubusercontent.com/685609/234360670-bd2628a1-0684-490d-a9eb-33846a60f72a.png)

## Changes:

- Added new `ENABLE_CUSTOM_ENTITLEMENT_COMPUTATION` compile time flag
- Hidden `configureInCustomEntitlementsModeWithApiKey` behind
`ENABLE_CUSTOM_ENTITLEMENT_COMPUTATION`
- Added new `RevenueCat_CustomEntitlementComputation` SPM target and
library
- Added CircleCI job for `swift build --target
RevenueCat_CustomEntitlementComputation`
- Added new `SPMCustomEntitlementComputationInstallation` using the new
`configureInCustomEntitlementsComputationMode`
- Added CircleCI job for `SPMCustomEntitlementComputationInstallation`
- Added `FrameworkDisambiguation.swift` to avoid using `RevenueCat.`
disambiguation for files that
- Changed API testers to only use the new methods if
`ENABLE_CUSTOM_ENTITLEMENT_COMPUTATION` is defined
- Updated `DangerousSettings` to not expose
`customEntitlementComputation` publicly. The only way to use that now
with `public` API is through
`Purchases.configureInCustomEntitlementsModeWithApiKey`
- Updated sample app to use new library
2023-04-25 15:11:58 -07:00
Andy BoedoandNachoSoto 618ff121d2 Custom Entitlements Computation mode (#2439)
### Changes:

- Added `Purchases.configureInCustomEntitlementsComputationMode`
- Added `Purchases.switchUser(to:)`
- Disabled parts of the SDK in this new mode
- New example app for testing `customEntitlementsComputation` mode

---------

Co-authored-by: NachoSoto <ignaciosoto90@gmail.com>
2023-04-25 13:21:46 -07:00