Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

chore: update openiap-gql to 1.0.11 with type improvements#17

Merged
hyochan merged 2 commits intomainfrom
chore/openiap-gql-1.0.11
Oct 2, 2025
Merged

chore: update openiap-gql to 1.0.11 with type improvements#17
hyochan merged 2 commits intomainfrom
chore/openiap-gql-1.0.11

Conversation

@hyochan
Copy link
Member

@hyochan hyochan commented Oct 2, 2025

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 externalPurchaseUrlOnIOSexternalPurchaseUrl 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

  • externalPurchaseUrlOnIOSexternalPurchaseUrl (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

⚠️ Field Rename: externalPurchaseUrlOnIOSexternalPurchaseUrl

Update any code using this field:

// Before
let url = props.externalPurchaseUrlOnIOS

// After  
let url = props.externalPurchaseUrl

Test Plan

  • swift test - All 10 tests passing
  • swift build - Package builds successfully
  • Example app builds and runs without errors
  • Alternative billing flow works correctly
  • Transaction finishing uses actual transaction data when available

This version support currentPlanId in ActiveSubscription and Purchase. This also support alternative billing which was supported in openiap-gql 1.0.10
- update openiap-gql from 1.0.9 to 1.0.11
- fix generate-types.sh to properly copy generated files
- regenerate Types.swift with new fields and public initializers:
  • add AlternativeBillingModeAndroid enum
  • add InitConnectionConfig struct
  • add currentPlanId, basePlanIdAndroid, purchaseTokenAndroid to ActiveSubscription
  • rename externalPurchaseUrlOnIOS → externalPurchaseUrl
  • include 19 public initializers for Input types (openiap-gql improvement)
- improve OpenIapModule+ObjC finishTransaction to use actual transaction data:
  • fetch from pending transactions when available
  • fall back to minimal PurchaseIOS when not in pending
  • properly handle currentEntitlements search
- add OpenIapSerialization helper methods for cross-module type creation
- update all references to use new field names
- simplify Example app with direct initialization
- all tests passing (10/10)

breaking changes:
- externalPurchaseUrlOnIOS renamed to externalPurchaseUrl
@hyochan hyochan added ፦ refactor 🚽 migration Activities due to changes in framework labels Oct 2, 2025
@hyochan hyochan merged commit 3e03345 into main Oct 2, 2025
1 check passed
@hyochan hyochan deleted the chore/openiap-gql-1.0.11 branch October 2, 2025 22:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

🚽 migration Activities due to changes in framework ፦ refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant