Paywalls: initial configuration types#2780
Conversation
06c9e6f to
55ff780
Compare
There was a problem hiding this comment.
Important that we don't fail to load the offering if this fails. The error will get logged with #2778
There was a problem hiding this comment.
we should fail at the Paywalls SDK level though
There was a problem hiding this comment.
This is what I'm thinking:
if let paywall = offering.paywall {
// The paywall is required
PaywallView(offering: offering, paywall: paywall)
} else {
// You gotta handle it and do something yourself.
}With the public PaywallData constructor, users could to this:
} else {
// This is hardcoded in the app
let simplePaywall = PaywallData(
template: .simple
config: ...
)
PaywallView(offering: offering, paywall: simplePaywall)
}There was a problem hiding this comment.
This is empty for now.
There was a problem hiding this comment.
This will obviously change, just a placeholder.
There was a problem hiding this comment.
We didn't update this when we exposed it for TestStoreProduct.
Paywalls: initial configuration typesPaywalls: initial configuration types
55ff780 to
0e0c0c7
Compare
There was a problem hiding this comment.
these are the changes from #2776, right? do we need to rebase?
0e0c0c7 to
eed569a
Compare
There was a problem hiding this comment.
we should fail at the Paywalls SDK level though
236de6f to
962b498
Compare
joshdholtz
left a comment
There was a problem hiding this comment.
Few small comments but otherwise 💯
There was a problem hiding this comment.
Yeah to resolve ambiguity for types that conform to both protocols :)
a8fd3b0 to
f2a5df3
Compare
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases - Made `DefaultDecodable` and `AnyDecodable` `Sendable`
a3f8ea0 to
fb95238
Compare
|
Finally figured out the test issues: #2802. |
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
- Added `Offering.paywall` - Decoding `PaywallData` in `OfferingsResponse`, using `IgnoreDecodeErrors` (this will be better after #2778) - New `PaywallData` `struct` - Added new APIs to testers - Testing paywall deserialization from `Offerings` - Testing paywall deserialization separately to check edge cases
Changes:
Offering.paywallPaywallDatainOfferingsResponse, usingIgnoreDecodeErrors(this will be better afterIgnoreDecodeErrors: log decoding error #2778)PaywallDatastructOfferingsOther changes:
DefaultDecodableandAnyDecodableSendable