Skip to content

fix(user-agent): identify native Flutter iOS apps - #289

Merged
HarshMN2345 merged 3 commits into
mainfrom
codex/fix-native-app-identification
Sep 17, 2026
Merged

HarshMN2345 merged 3 commits into
mainfrom
codex/fix-native-app-identification

Conversation

@HarshMN2345

@HarshMN2345 HarshMN2345 commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Flutter iOS headers such as com.example.myapp/1.0.0 iPhone17,1 iOS/18.1 currently produce no client identity. Recognize this native format as a mobile app, using its bundle identifier and version, while preserving existing browser/library precedence and OS/device detection.

Addresses appwrite/appwrite#9372. This fixes the missing native-app metadata in the current parser; Appwrite must adopt a release containing this change before deployed account/session metadata changes.

Validation:

  • bin/monorepo test user-agent: 98 tests, 402 assertions passed. The new UserAgentTest::testNativeAppIsMobileApp case fails against the unchanged parser.
  • bin/monorepo check user-agent: Pint, PHPStan, and Rector passed.
  • Ran Appwrite's current Detector wrapper with the exact reported header before/after: empty client identity becomes mobile app / com.example.myapp; OS/device values are unchanged.

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Benchmark results

user-agent

Parser Operations/second Relative
Utopia User Agent 102,713 205.99x
Matomo DeviceDetector 6.4 499 1.00x

Shared CI runners — treat absolute numbers as rough, compare modes within a run. Commit 5dfeff9.

@HarshMN2345

Copy link
Copy Markdown
Member Author

@greptile

@HarshMN2345
HarshMN2345 merged commit 81a0f19 into main Sep 17, 2026
5 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