Skip to content

[in_app_purchase] Fixes StoreKit 2 date format does not match in_app_… - #11717

Merged
auto-submit[bot] merged 3 commits into
flutter:mainfrom
absar:date-format-issue-175072
Jul 23, 2026
Merged

[in_app_purchase] Fixes StoreKit 2 date format does not match in_app_…#11717
auto-submit[bot] merged 3 commits into
flutter:mainfrom
absar:date-format-issue-175072

Conversation

@absar

@absar absar commented May 15, 2026

Copy link
Copy Markdown
Contributor

…purchase_platform_interface

Description

  • As per PurchaseDetails.transactionDate api documentation, date should be Milliseconds since epoch but the migration to StoreKit2 probably mistakenly changed the date format to "yyyy-MM-dd HH:mm:ss". The issue originated in StoreKit2Translators.swift extension Transaction convertToPigeon which was using a magic hardcoded formatter dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
  • Fixes both SK2Transaction.purchaseDate and SK2Transaction.expirationDate and ultimately PurchaseDetails.transactionDate

Tests

Unfortunately it is not testable because the StoreKit 2 Transaction type has no visible initializers, probably thats why there are no tests for StoreKit2Translators.swift extension Transaction convertToPigeon

Related Issues

Fixes flutter/flutter#175072

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: in_app_purchase platform-ios platform-macos triage-ios Should be looked at in iOS triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

in_app_purchase_storekit date format does not match in_app_purchase_platform_interface PurchaseDetails.transactionDate format

5 participants