This repository was archived by the owner on Oct 16, 2025. It is now read-only.
Commit 3e03345
authored
chore: update openiap-gql to 1.0.11 with type improvements (#17)
## Summary
Updates openiap-gql dependency from 1.0.9 to 1.0.11, bringing improved
type definitions with public initializers and new fields for alternative
billing support.
- **Type System Improvements**: Regenerated `Types.swift` with 19 new
public initializers for Input types, eliminating cross-module
initialization issues
- **Alternative Billing Support**: Added `AlternativeBillingModeAndroid`
enum and `InitConnectionConfig` struct
- **Enhanced Transaction Handling**: Improved ObjC bridge to use actual
transaction data from pending transactions
- **Field Naming Updates**: Renamed `externalPurchaseUrlOnIOS` →
`externalPurchaseUrl` for consistency
## Changes
### Dependencies
- Updated `openiap-gql` from 1.0.9 to 1.0.11 in `openiap-versions.json`
### Code Generation
- Fixed `generate-types.sh` script to properly copy generated files
- Regenerated `Sources/Models/Types.swift` with latest schema
### New Types & Fields
- `AlternativeBillingModeAndroid` enum (iOS alternative billing mode
support)
- `InitConnectionConfig` struct (connection configuration)
- `ActiveSubscription`: Added `currentPlanId`, `basePlanIdAndroid`,
`purchaseTokenAndroid` fields
### API Changes
- `externalPurchaseUrlOnIOS` → `externalPurchaseUrl` (breaking change)
- All Input types now have public initializers (improved DX for
cross-module usage)
### Implementation Improvements
- **`OpenIapModule+ObjC.swift`**: Enhanced
`finishTransactionWithPurchaseId` to fetch actual transaction data from
pending transactions before falling back to minimal data
- **`OpenIapSerialization.swift`**: Added helper methods for creating
Input types:
- `requestSubscriptionIosProps()`
- `requestPurchaseIosProps()`
- `requestSubscriptionPropsByPlatforms()`
- `requestPurchasePropsByPlatforms()`
- **`Example/AlternativeBillingScreen.swift`**: Simplified to use direct
initialization with new public initializers
## Breaking Changes
1 parent 5fab0a7 commit 3e03345
File tree
7 files changed
+261
-46
lines changed- Example/OpenIapExample/Screens
- Sources
- Models
- scripts
7 files changed
+261
-46
lines changedLines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | 337 | | |
339 | 338 | | |
340 | 339 | | |
341 | 340 | | |
342 | | - | |
| 341 | + | |
343 | 342 | | |
344 | 343 | | |
345 | 344 | | |
346 | 345 | | |
347 | | - | |
348 | 346 | | |
349 | 347 | | |
350 | 348 | | |
| |||
0 commit comments