Skip to content

4.16.1#487

Merged
yusuftor merged 8 commits into
masterfrom
develop
Jul 1, 2026
Merged

4.16.1#487
yusuftor merged 8 commits into
masterfrom
develop

Conversation

@yusuftor

@yusuftor yusuftor commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Changes in this pull request

Promotes developmaster for the 4.16.1 patch release.

Fixes

  • Corrects the compiler directive gating the Apple billing-plan APIs (PricingTerms / BillingPlanType / the billing-plan purchase option). Those symbols ship in the Xcode 26.5 SDK (Swift 6.3.2); the previous #if compiler(>=6.3) gate let the code compile against the Xcode 26.4 SDK — which backdates their runtime availability to iOS 26.4 but doesn't include the symbols — and failed with 'PricingTerms' is not a member type of 'Product.SubscriptionInfo'. The gates are now #if compiler(>=6.3.2), so the SDK builds on Xcode 26.4 (block excluded) and 26.5+ (block compiled).

Checklist

  • All unit tests pass.
  • All UI tests pass.
  • Demo project builds and runs on iOS.
  • Demo project builds and runs on Mac Catalyst.
  • Demo project builds and runs on visionOS.
  • I added/updated tests or detailed why my change isn't tested.
  • I added an entry to the CHANGELOG.md for any breaking changes, enhancements, or bug fixes.
  • I have run swiftlint in the main directory and fixed any issues.
  • I have updated the SDK documentation as well as the online docs.
  • I have reviewed the contributing guide

🤖 Generated with Claude Code

Greptile Summary

This PR prepares the 4.16.1 patch release. The main changes are:

  • Bumps the SDK version to 4.16.1.
  • Adds the 4.16.1 changelog entry.
  • Tightens StoreKit billing-plan API gates to Swift compiler 6.3.2+.
  • Reports newer Swift compiler patch versions in device attributes.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The StoreKit billing-plan symbols are consistently guarded by the tighter compiler check.
  • The release version sources changed in this PR match each other.

Important Files Changed

Filename Overview
CHANGELOG.md Adds the 4.16.1 release note for the billing-plan compiler gate fix.
Sources/SuperwallKit/Misc/Constants.swift Updates the runtime SDK version string from 4.16.0 to 4.16.1.
Sources/SuperwallKit/Network/Device Helper/SwiftVersion.swift Adds compiler-version branches for Swift 6.3.2, 6.3.3, and 6.4.
Sources/SuperwallKit/StoreKit/Products/StoreProduct/SK2StoreProduct.swift Raises the compile-time gate for billing-plan pricing-term APIs to Swift compiler 6.3.2+.
Sources/SuperwallKit/StoreKit/Transactions/Purchasing/StoreKit 2/ProductPurchaserSK2.swift Raises the compile-time gate for the StoreKit 2 billing-plan purchase option to Swift compiler 6.3.2+.
SuperwallKit.podspec Updates the CocoaPods package version from 4.16.0 to 4.16.1.

Reviews (1): Last reviewed commit: "Update version" | Re-trigger Greptile

Context used:

  • Context used - CLAUDE.md (source)

anglinb and others added 5 commits June 29, 2026 16:07
Product.SubscriptionInfo.PricingTerms (and the related BillingPlanType /
billing-plan purchase option) ship in the iOS 26.5 SDK, not 26.4. The
runtime availability checks gated them at 26.4, which compiles against an
SDK that annotates the symbols at 26.4 but errors against the 26.5 SDK
("only available in iOS 26.5 or newer"). Bump the @available and
#available floors to 26.5 (gating higher than the floor is always safe)
and update the doc comments to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This reverts commit 688cb7a. Apple's SDK header declares
`Product.SubscriptionInfo.pricingTerms` (and thus the `PricingTerms`
type it returns) as `@available(iOS 26.4, ...)`, not 26.5 — the earlier
"26.5-only" claim was incorrect. The original 26.4 gate was right;
gating at 26.5 would have wrongly denied billing plans to 26.4 devices.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PricingTerms / BillingPlanType / the billing-plan purchase option ship in
the Xcode 26.5 SDK (Swift 6.3.2). Xcode 26.4 (Swift 6.3) backdates their
runtime availability to iOS 26.4 but doesn't include the symbols, so the
`#if compiler(>=6.3)` gate let the code compile against the 26.4 SDK and
failed with "'PricingTerms' is not a member type of 'Product.Subscription
Info'". Tighten all three billing-plan gates to compiler(>=6.3.2) so the
blocks are excluded on 26.4 toolchains and compiled on 26.5+.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes — patch release 4.16.1 promoting developmaster, centered on a single compiler-directive fix plus version bumps.

  • Correct the billing-plan SDK gate — the Apple billing-plan StoreKit symbols (Product.SubscriptionInfo.PricingTerms / BillingPlanType / Product.PurchaseOption.billingPlanType(_:)) first ship in the Xcode 26.5 SDK (Swift 6.3.2), not Xcode 26.4 (Swift 6.3). The three #if compiler(>=6.3) gates wrapping those symbols (SK2StoreProduct.swift:46, :243, ProductPurchaserSK2.swift:104) now use >=6.3.2, so the SDK compiles on Xcode 26.4 (block excluded) and 26.5+ (block compiled). The unchanged @available(iOS 26.4, …) runtime gates remain correct.
  • Extend version-reporting cascadeSwiftVersion.swift currentCompilerVersion() now recognizes 6.4 / 6.3.3 / 6.3.2, with correct newest→oldest #elseif ordering. Analytics string only.
  • Version bumpsConstants.swift sdkVersion, SuperwallKit.podspec s.version, and a new CHANGELOG.md entry all advance to 4.16.1.

The fix is mechanically consistent: every gate wrapping a 26.4-only StoreKit symbol moved to >=6.3.2, while Superwall's own AppStoreProduct.BillingPlanType (a plain Int-backed enum) correctly stays ungated. All three version-bearing files agree on 4.16.1. The change is compile-time gating only, so runtime behavior is unaffected. Two non-blocking nits below.

ℹ️ Nitpicks

  • ProductPurchaserSK2.swift:104 — the removed comment block explained the billing-plan fallback (older runtime / no configured plan → Apple's default plan). Minor context loss; the parallel feature comment in SK2StoreProduct.swift still documents the mechanism, so this is fine.
  • CHANGELOG.md:9 — "builds in Xcode version 26.4" is accurate but understates the fix; the directive change is what keeps the 26.5-only symbols out of the 26.4 build. Consider noting it gates Xcode 26.5 SDK symbols.

Pullfrog  | View workflow run | Using Claude Opus𝕏

@yusuftor yusuftor merged commit 3c360d5 into master Jul 1, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants