WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
281848
Shape Detection API doesn't work on iOS
https://bugs.webkit.org/show_bug.cgi?id=281848
Summary
Shape Detection API doesn't work on iOS
Danny Moerkerke
Reported
2024-10-21 04:05:34 PDT
The Shape Detection API was working until Safari 17.6.x when enabled in feature flags but is no longer working. To reproduce: 1. navigate to
https://whatpwacando.today/barcode
in Safari on iOS 18 with Shape Detection API enabled in feature flags 2. tap the "Scan code" button 3. scan a QR-code with the camera 4. code is not detected 1. navigate to
https://whatpwacando.today/face-detection
in Safari on iOS 18 with Shape Detection API enabled in feature flags 2. tap the "Detect face" button 3. scan face with the camera 4. face is not detected The Shape Detection API does work on macOS Sequoia.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-10-22 09:11:22 PDT
<
rdar://problem/138403640
>
Jonathan
Comment 2
2024-11-06 08:28:25 PST
I hope Apple fixes this soon. The barcode detector API is far superior to any Javascript implementation. Making the shape detection API widely available would greatly enhance the development of robust, efficient applications that rely on scanning capabilities.
chaffeqa
Comment 3
2024-12-17 00:11:56 PST
This API is very important modern-day technology with the prolificness of QR codes. I would love to see it fixed
Jaap Weijland
Comment 4
2025-01-14 05:37:30 PST
I also hope this API becomes widely available. Now I'm relying on native apps purely for the scanning capability.
Erik Paulson
Comment 5
2025-02-12 11:34:31 PST
The examples above of whatpwacando.today did not seem to work in Safari 18.3. As a workaround I'm using the barcode-detector-polyfill (
https://github.com/undecaf/barcode-detector-polyfill
), which compiles an existing barcode detector to WASM and brings that in, but it'd be really great to skip that and use the built-in APIs from safari.
chaffeqa
Comment 6
2025-02-12 12:52:44 PST
I'm currently doing a workaround for iOS using
https://github.com/cozmo/jsQR
Erik Paulson
Comment 7
2025-04-04 09:47:02 PDT
The linked examples for barcode detection did not seem to work on iOS 18.4 on my iphone 15. I can scan the same barcode in the same light conditions on a pixel android with the example site, so I think the barcode is recognizable. (I had to reenable the feature flag after upgrading to iOS 18.4, so if you don't even get a camera stream going, check that first)
Erik Paulson
Comment 8
2025-05-16 15:22:21 PDT
The linked example for barcode detection did not seem to work on iOS 18.5 on my iphone 15. I was again successful with the same barcode in the same light with my pixel android, so I don't think it's just this barcode. Hopefully we'll see a fix in 18.6, or that someone will be able to try it out with an iOS 19 beta later this summer.
Erik Paulson
Comment 9
2025-06-12 09:43:53 PDT
I tried the linked example for barcode detection with the first iOS 26 developer beta release, using an iPhone 12 Pro. I was not successful in reading any barcodes I tried. Before I upgraded this iPhone to iOS 26, it was still running iOS 17.1 and the linked webpage was able to detect the barcode on the same test items I was using with iOS 26 beta. (The shapes detection API is still behind a feature flag in iOS 26 and was turned off after my upgrade)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug