AR not offered in DuckDuckGo iOS (`Ddg/` UA), Ecosia iOS, and Firefox for Android

Aperta Adatta ai principianti
#5,227 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

@13Sharad ci sta già lavorando.

Dal 25/11/2026.

  • #5229 di @13Sharad — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
android, ios, typescript
Ambito
ar-vr-xr, web-dev

Direzione di ricerca

Le regex UA IS_IOS_THIRDPARTY e IS_SCENEVIEWER_CANDIDATE si trovano in src/constants.ts; inizia lì e controlla come canActivateAR le usa. Le modifiche proposte aggiungono Ddg\/ e Ecosia ios@ al pattern iOS e rimuovono il termine !IS_FIREFOX. Fatto significa che le costanti e i loro test riflettono le stringhe UA elencate e che il percorso del pulsante AR è verificato su un dispositivo, poiché l'autore non l'ha ancora confermato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

canActivateAR is false in three mobile browsers that can show AR, so the AR button never appears in them. The cause is model-viewer's UA allowlists in src/constants.ts (4.4.0 and master):

1. DuckDuckGo on iOS sends Ddg/, not DuckDuckGo/.
IS_IOS_THIRDPARTY matches DuckDuckGo\/. DuckDuckGo's iOS app now sends a Ddg/<version> brand token by default. Its UA is chosen by a remote privacy config, and the live ios-config.json (features.customUserAgent.settings.defaultPolicy) is "brand", which appends Ddg/<version> (createBrandComponent in iOS/Core/Web/UserAgentManaging.swift, duckduckgo/apple-browsers). The old DuckDuckGo/<major> token only survives on the ~60 sites in ddgFixedSites. A real UA from an iPhone 13 mini:

Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.7 Mobile/15E148 Safari/604.1 Ddg/18.7

relList.supports("ar") is false in its WKWebView, so IS_AR_QUICKLOOK_CANDIDATE is false. The app does handle USDZ: it auto-previews model/vnd.usdz+zip in QLPreviewController (FilePreviewHelper.swift, with a UI test testWhenARFileIsOpenedThenItIsPreviewedInQuickLook).

2. Ecosia on iOS has no recognised token.
Ecosia is a fork of firefox-ios and keeps Firefox's USDZ → QLPreviewController handler (OpenQLPreviewHelper, used from BrowserViewController+WebViewDelegates.swift). But its mobile UA swaps FxiOS/ for (Ecosia ios@<version>) (BrowserKit/Sources/Shared/UserAgent.swift, ecosia/ios-browser), so it never matches IS_IOS_THIRDPARTY.

3. Firefox for Android is excluded from Scene Viewer.
IS_SCENEVIEWER_CANDIDATE excludes /firefox/i. Current Firefox for Android resolves intent:// links, including S.browser_fallback_url (android-components feature/app-links/AppLinksUseCases.kt).

Proposed approach
  • IS_IOS_THIRDPARTY: /CriOS\/|EdgiOS\/|FxiOS\/|GSA\/|DuckDuckGo\/|Ddg\/|Ecosia ios@/
  • IS_SCENEVIEWER_CANDIDATE: drop the !IS_FIREFOX term.

We have applied exactly these edits to a vendored 4.4.0 build. Happy to open a PR with tests.

Not yet verified (help welcome)
  • Devices:
  • Firefox for Android may ask "Open in app?" before launching the Google app, depending on its "Open links in apps" setting.
  • DuckDuckGo's and Firefox's USDZ handlers are written for downloaded/navigated responses. That they also catch model-viewer's generated blob: USDZ (anchor with download) is the thing to confirm on a device.
Browser, OS, hardware

DuckDuckGo iOS 18.7 on iPhone 13 mini (reported); others from source reading.

Versions

model-viewer 4.4.0 (same regexes on master).

Lingua principale
TypeScript
Stelle
8.4k
Fork
964
Merge medio
5g 11h
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di google/model-viewer

Tutte le issue di google/model-viewer

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.