-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create separate
SPM
library to enable custom entitlement computation (
#2440) Fixes SDK-3084  ## 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
- Loading branch information
Showing
30 changed files
with
998 additions
and
55 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Sources |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// Copyright RevenueCat Inc. All Rights Reserved. | ||
// | ||
// Licensed under the MIT License (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://opensource.org/licenses/MIT | ||
// | ||
// FrameworkDisambiguation.swift | ||
// | ||
// Created by Nacho Soto on 4/25/23.w | ||
|
||
/** | ||
Purpose: this file is needed because several parts of the SDK need to explicitily reference a type or value | ||
from the `RevenueCat` target. However, we expose 2 variants of the framework from SPM: | ||
`RevenueCat` and `RevenueCat_CustomEntitlementComputation` (see `Package.swift`). | ||
Because of that, we can't simply do `RevenueCat.ErrorCode` for example, since the other variant | ||
would need `RevenueCat_CustomEntitlementComputation.ErrorCode`. | ||
|
||
To handle that, this exposes those types explicitly so they work regardless of the name of the framework. | ||
*/ | ||
|
||
typealias RCRefundRequestStatus = RefundRequestStatus | ||
typealias RCErrorCode = ErrorCode | ||
let RCDefaultLogHandler = defaultLogHandler |
Oops, something went wrong.