KitSubscription.Platform (IapPlatform) and KitProduct.Platform
(KitProductPlatform) are the only wire fields on the KitApi records typed as
enums; everything else IAPKit could extend — State, Type, BillingPeriod,
Kind, Format — is already string.
Both converters throw on an unrecognised value:
IapPlatformJsonConverter.Read at libraries/maui-iap/src/OpenIap.Maui/Types.cs
ends in throw new JsonException(...) with no Unknown member to land on, and
KitProductPlatform uses the stock JsonStringEnumConverter. Because the body
is decoded in one parsed.Deserialize<T>() in KitApi.cs, a single unknown
platform empties the entire entitlements or products response rather than
dropping one row.
IAPKit deploys from main and already carries horizon and amazon on the
verify surface, so widening platform is plausible.
Blocked on a decision: the clean fix changes a public property type
(IapPlatform -> string, matching State on the same record) in a released
package. A non-breaking alternative is a KitApi-local tolerant converter plus
per-element decoding of the subscriptions, products and offers arrays.
Types.cs is generated and must not be hand-edited.
Context: #321, and /docs/kit-compatibility for the policy.
KitSubscription.Platform(IapPlatform) andKitProduct.Platform(
KitProductPlatform) are the only wire fields on the KitApi records typed asenums; everything else IAPKit could extend —
State,Type,BillingPeriod,Kind,Format— is alreadystring.Both converters throw on an unrecognised value:
IapPlatformJsonConverter.Readatlibraries/maui-iap/src/OpenIap.Maui/Types.csends in
throw new JsonException(...)with noUnknownmember to land on, andKitProductPlatformuses the stockJsonStringEnumConverter. Because the bodyis decoded in one
parsed.Deserialize<T>()inKitApi.cs, a single unknownplatform empties the entire entitlements or products response rather than
dropping one row.
IAPKit deploys from
mainand already carrieshorizonandamazonon theverify surface, so widening
platformis plausible.Blocked on a decision: the clean fix changes a public property type
(
IapPlatform->string, matchingStateon the same record) in a releasedpackage. A non-breaking alternative is a KitApi-local tolerant converter plus
per-element decoding of the
subscriptions,productsandoffersarrays.Types.csis generated and must not be hand-edited.Context: #321, and
/docs/kit-compatibilityfor the policy.