Skip to content

Renamed CallbackCache.add(callback:)#1970

Merged
NachoSoto merged 1 commit into
mainfrom
callback-cache-parameter
Oct 11, 2022
Merged

Renamed CallbackCache.add(callback:)#1970
NachoSoto merged 1 commit into
mainfrom
callback-cache-parameter

Conversation

@NachoSoto

Copy link
Copy Markdown
Contributor

This is the Swifty way to avoid the duplication in cache.add(callback: callback).

This is the Swifty way to avoid the duplication in `cache.add(callback: callback)`.
@NachoSoto NachoSoto merged commit b08fb7d into main Oct 11, 2022
@NachoSoto NachoSoto deleted the callback-cache-parameter branch October 11, 2022 19:47
NachoSoto added a commit that referenced this pull request Oct 11, 2022
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 tester = SDKTester.default
do {
  try await tester.test()
} 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`)

- #1970
- #1971
- #1973
- #1974
- #1975
- #1976
NachoSoto added a commit that referenced this pull request Oct 14, 2022
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 tester = SDKTester.default
do {
  try await tester.test()
} 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`)

- #1970
- #1971
- #1973
- #1974
- #1975
- #1976
NachoSoto added a commit that referenced this pull request Oct 27, 2022
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 tester = SDKTester.default
do {
  try await tester.test()
} 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`)

- #1970
- #1971
- #1973
- #1974
- #1975
- #1976
NachoSoto added a commit that referenced this pull request Oct 27, 2022
…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
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