Commit Graph
11 Commits
Author SHA1 Message Date
NachoSoto b3875a9380 Exposed PurchasesReceiptParser and AppleReceipt (#2153)
Initial step for [CSDK-17]. Fixes [CSDK-523].

### Changes:
- Renamed `ReceiptParser` to `PurchasesReceiptParser` to avoid name
collision with future SPM `ReceiptParser`
- Exposed `ReceiptParser`, `AppleReceipt`,
`PurchasesReceiptParser.Error`
- Added new types to `SwiftAPITester`
- Added docs to these types
- Moved `LoggerType` to be available to `ReceiptParser`
- Moved `DateFormatter+Extensions` to be available to `ReceiptParser`
- Moved `Codable+Extensions` to be available to `ReceiptParser`
- Created `ReceiptParserLogger` for `ReceiptParser`


[CSDK-17]:
https://revenuecats.atlassian.net/browse/CSDK-17?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

[CSDK-523]:
https://revenuecats.atlassian.net/browse/CSDK-523?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
2022-12-22 10:09:12 -08:00
NachoSoto faf51e3d99 Introduced PurchasesDiagnostics to help diagnose SDK configuration errors (#1977)
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
2022-10-27 12:00:53 -07:00
NachoSoto 74233408c4 Docs: fixed logIn references (#2002) 2022-10-26 14:43:43 -07:00
NachoSoto a4bf2647f8 Purchases.configure: added overload taking a Configuration.Builder (#1720)
Fixes [CF-780].

See https://github.com/RevenueCat/purchases-ios/issues/1717#issuecomment-1160718519 for an example of a user trying to do this.
2022-06-21 12:34:11 -07:00
Joshua Liebowitz 2d0a9e8820 Update doc reference to `Purchases/customerInfo(fetchPolicy:)` (#1636)
* Update doc reference to ``Purchases/customerInfo(fetchPolicy:)``
* Replace ``Purchases/customerInfo()`` with ``Purchases/customerInfo(fetchPolicy:)``
2022-05-31 15:26:17 -07:00
aboedo 85bff6d467 cleaned up docs for the configure method (#1623) 2022-05-27 10:24:38 -03:00
aboedo 3fa269a2b4 alphabetized integration subs attributes in documentation and added setCleverTapID (#1530) 2022-04-25 15:04:24 -03:00
aboedo 5679b2b954 expose setPushTokenString method (#1525)
* 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
2022-04-25 14:20:50 -03:00
Cody Kerns 7ee038f20f New public convenience setter for Firebase app instance ID (#1522)
* Adds Firebase convenience setter
2022-04-21 14:20:52 -04:00
Cody Kerns 441058fae7 Add SK2 initializer to DocC (#1468) 2022-04-06 16:17:38 -04:00
aboedo e5710aeaee Static docC docs part 2: folder structure cleanup for docC plugin (#1421)
* 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
2022-03-31 12:20:39 -03:00