Skip to content

[Swift] Add runtime iOS version to user agent#270

Draft
kieran-osgood-shopify wants to merge 1 commit into
mainfrom
cx-ios-version-user-agent
Draft

[Swift] Add runtime iOS version to user agent#270
kieran-osgood-shopify wants to merge 1 commit into
mainfrom
cx-ios-version-user-agent

Conversation

@kieran-osgood-shopify

@kieran-osgood-shopify kieran-osgood-shopify commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Stack Context

This PR updates the Swift Checkout Kit user-agent suffix so checkout WebView traffic and Accelerated Checkouts GraphQL traffic include the actual runtime iOS version.

What?

  • Adds an iOSVersion/<UIDevice.current.systemVersion> token to the existing ShopifyCheckoutKit/... (iOS;Swift ...) metadata suffix.
  • Updates UserAgentTests expected strings to include the dynamic runtime iOS version.
  • Adds focused test coverage that documents the runtime iOS version token.

Why?

WebKit/Safari can report a frozen built-in iOS user-agent value such as 18_7, which makes iOS 26 traffic difficult to distinguish. Checkout Kit already appends a custom user-agent suffix through the shared UserAgent.string(...) path, so adding a stable machine-readable token there gives observability the actual runtime iOS version without changing public API.

Validation

  • shadowenv exec --dir /Users/ko/.claudex/worktrees/Shopify@checkout-kit/cx-ios-version-user-agent -- /opt/dev/bin/dev swift test UserAgentTests
  • shadowenv exec --dir /Users/ko/.claudex/worktrees/Shopify@checkout-kit/cx-ios-version-user-agent -- /opt/dev/bin/dev swift lint
  • shadowenv exec --dir /Users/ko/.claudex/worktrees/Shopify@checkout-kit/cx-ios-version-user-agent -- /opt/dev/bin/dev swift api check

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kieran-osgood-shopify kieran-osgood-shopify changed the title Add runtime iOS version to user agent [Swift] Add runtime iOS version to user agent Jun 10, 2026
@github-actions

Copy link
Copy Markdown

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 92%
91.59% (316/345) 87.25% (178/204) 100% (82/82)

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.

1 participant