* [EXTERNAL] Adds a convenience method to set the Amplitude User ID ($amplitudeUserId) and Amplitude Device ID ($amplitudeDeviceId) (#5425)
* Adding Amplitude UserID and DeviceID
* Add convenience method for setting Amplitude User ID and Amplitude Device ID
* fix lint
---------
Co-authored-by: Axel Le Pennec <alpennec@users.noreply.github.com>
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
### 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>
Finishes [CSDK-451].
This new small public API allows users to quickly figure out if
everything in the SDK is correctly configured in a simple way:
```swift
let diagnostics = PurchasesDiagnostics.default
do {
try await diagnostics.testSDKHealth()
} catch {
print(error)
}
```
The specific underlying errors will provide information about what
failed.
We can continue growing this to check for more specific things, but for
now it does 4 things:
- Verify API connectivity: networking issues, firewalling, etc.
- Verify API key is correct
- Verify `Offerings` are configured correctly
- Verify that all products in `Offerings` are configured correctly and
found in `StoreKit`
This new API is covered by:
- API testers
- Unit tests
- Integration tests (both on `SK1` and `SK2`)
_I've taken the "shortcut" of making this `async` only (while still
compatible with Objective-C), which means it's not compatible with iOS
12.x. But that made the implementation a lot simpler, which I think is a
useful tradeoff._
### Depends on:
- #1970
- #1971
- #1973
- #1974
- #1975
- #1976
[CSDK-451]:
https://revenuecats.atlassian.net/browse/CSDK-451?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
* added setPushTokenString methods
* added links to the new method in docC
* fixed swift api tests
* actually fixed them now, don't know what I was thinking on the previous commit
* fix tests
* added lanes to preview and compile docc docs
* added package dependency on swift-docc-plugin
* ignored all Package.resolved files
* added env variable so that the package doesn't unnecessarily pull in the docC plugin for our customers
* fix linting
* moved docC catalog for spm plugin compatibility, added empty swift file, updated Package.swift so it only builds from sources
* fixed a couple of outdated paths
* added comment to empty file