Skip to content

Update CI to Xcode 26.2 - #6088

Merged
ajpallares merged 11 commits into
mainfrom
ci-xcode-26.2
Jan 16, 2026
Merged

ajpallares merged 11 commits into
mainfrom
ci-xcode-26.2

Conversation

@ajpallares

@ajpallares ajpallares commented Jan 16, 2026 •

Copy link
Copy Markdown
Member

Changes

  • Updated CI configuration to use Xcode 26.2 and iOS 26.2 simulators for test jobs
  • Skip testFetchProductsWithIdentifiersSK2ErrorTracksCorrectly on iOS 26 due to a known Apple bug

Known Issue

The test testFetchProductsWithIdentifiersSK2ErrorTracksCorrectly is skipped on iOS 26 because SKTestSession.setSimulatedError() doesn't work for the .loadProducts API in iOS 26.2 (I could reproduce locally). This has been reported as an StoreKitTest framework bug:

🔗 Apple Developer Forums: SKTestSession.setSimulatedError() not working for .loadProducts API in iOS 26.2

@ajpallares
ajpallares requested a review from a team as a code owner January 16, 2026 15:09
@ajpallares

Copy link
Copy Markdown
Member Author

@RCGitBot please test

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 Thanks for updating this!

@ajpallares
ajpallares merged commit 4d7ae77 into main Jan 16, 2026
49 checks passed
@ajpallares
ajpallares deleted the ci-xcode-26.2 branch January 16, 2026 15:39
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Oct 27, 2026
Fixes flutter/flutter#194285 (hopefully)

The main cause of flutter/flutter#194285 (where `Product.products(for:)` returned `[]` across StoreKit 2 tests on the iOS 27 simulator) was fixed in #13213 by preventing the example app from calling StoreKit APIs before `SKTestSession` initialized. However, `testGetProductsWithStoreKitError` and `testFailedNetworkErrorPurchase` remains fragile in iOS 26.2+

This is still because product caching in `StoreKitTest` is still 1. Opaque 2. unable to be manually cleared - the product cache sticks around even after calling `resetToDefaultState()`. Thus, the state of the cache depends on the order that the tests will run. :/ So, if a test that purchases a product succeeds, if we later hit `setSimulatedError(..., forAPI: .loadProducts)`, the cached product will be returned, causing the test to fail. 

This is an issue that RevenueCat also ran into as shown here: RevenueCat/purchases-ios#6088, where they skip tests using `.loadProduct` for anything above ios 26. Instead of keeping dead tests around, I think its fair to just remove them and avoid just keeping dead code around till the end of time. Additionally, the code paths tested by the removed tests are already being hit by `testFailedProductUnavilablePurchase`, so we arent really losing coverage. 

Additionally in this PR I fix up some leaky states between tests.

## Pre-Review Checklist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants