3.4.0 - PurchaseState Cleanup & API Consolidation
· One min read
This release reflects OpenIAP v1.3.11 updates, simplifying the PurchaseState enum and consolidating the Android billing API.
Breaking Changes
- PurchaseState: Removed
failed,restored,deferred(now onlypending,purchased,unknown) - AlternativeBillingModeAndroid: Deprecated in favor of
BillingProgramAndroid - useAlternativeBilling: Deprecated (only logged debug info, had no effect on purchase flow)
Migration Guide
| Before (Deprecated) | After (Recommended) |
|---|---|
alternativeBillingModeAndroid: 'user-choice' | enableBillingProgramAndroid: 'user-choice-billing' |
alternativeBillingModeAndroid: 'alternative-only' | enableBillingProgramAndroid: 'external-offer' |
// Before
const {connected} = useIAP({
alternativeBillingModeAndroid: 'user-choice',
});
// After
const {connected} = useIAP({
enableBillingProgramAndroid: 'user-choice-billing',
});
OpenIAP Versions
| Package | Version |
|---|---|
| openiap-gql | 1.3.11 |
| openiap-google | 1.3.21 |
| openiap-apple | 1.3.9 |
For detailed changes, see the OpenIAP Release Notes.
