On iPhone 16e running iOS 26, we have now lost barcode detection through two
independent APIs. Other device models in the same fleet, on the same app build
and the same iOS version, are unaffected.
Background: the original failure (AVCaptureMetadataOutput)
Our retail app scans EAN-13, Code 128 and ITF barcodes. It originally used
AVCaptureMetadataOutput with metadataObjectTypes set accordingly.
After the update to iOS 26, this stopped working on iPhone 16e. The behaviour was
completely silent: the capture session reported isRunning == true, the camera
preview stayed live and correctly exposed, no interruption or runtime-error
notifications were posted — but metadataOutput(_:didOutput:from:) simply never
fired again, for any barcode. There was no error of any kind to go on.
Restarting the app did not help. Only a full device reboot restored detection.
Because the metadata path performs detection in the media daemon rather than in
our process, we moved detection into the app to work around it.
The current failure (Vision)
Frames now come from an AVCaptureVideoDataOutput (preset .hd1280x720, .up
orientation) and are analyzed in-process:
let request = VNDetectBarcodesRequest()
request.symbologies = [...]
let handler = VNImageRequestHandler(cvPixelBuffer: pixelBuffer,
orientation: .up, options: [:])
try handler.perform([request])
On the same devices, handler.perform() now throws for every analyzed frame:
Error Domain=com.apple.Vision Code=9 "Could not build inference plan - ANECF
error: failed to load ANE model file:///System/Library/Frameworks/Vision.framework/
mrcdetector.H17.espresso.hwx Error=createProgramInstanceForModel:modelToken:
modelFilePath:qos:isPreCompiled:enablePowerSaving:skipPreparePhase:statsMask:
memoryPoolID:enableLateLatch:modelIdentityStr:owningPid:cacheUrlIdentifier:
aotCacheUrlIdentifier:optOutOfModelMemoryUnwiring:error:: Program load failure
(0x50004) (DESIGN)"
So the second approach fails as well — but loudly, and one layer down. The
failing model is a system model shipped inside Vision.framework; we load no Core
ML model of our own.
Shared characteristics
Both failures behave identically in the ways that matter:
Same device model (iPhone 16e), starting with iOS 26
Camera pipeline healthy throughout: frames keep arriving continuously (verified
by a watchdog on the sample buffer delegate), preview live, no
AVCaptureSessionWasInterrupted and no AVCaptureSessionRuntimeError
Detection never recovers on its own
An app restart does not help; only a device reboot does
Over one workday we recorded ~65,000 consecutive Vision failures across four
devices, with zero successful detections in between.
This makes us suspect both symptoms share a root cause below the two APIs, rather
than being two unrelated bugs.
What we tried
We found thread 761095, where the same error signature (Code=9, "Could not build
inference plan - ANECF error", "(DESIGN)") was reported on visionOS 2.0 beta for a
different system model, and where the suggested workaround was to restrict the
request to CPU/GPU via setComputeDevice(_:for:). We implemented that as a runtime
fallback:
let devices = try request.supportedComputeStageDevices[.main] ?? []
// pick .gpu, else .cpu
request.setComputeDevice(device, for: .main)
We have not yet been able to confirm on an affected device whether this actually
bypasses the failing path, since we cannot reproduce the state on demand.
Questions
Is this a known issue on iOS 26 / iPhone 16e?
Could the silent AVCaptureMetadataOutput failure and this ANE model load
failure share a common cause?
Is restricting the compute stage to CPU/GPU a supported workaround for
VNDetectBarcodesRequest, or does the barcode detector always require the ANE?
Is there any way to recover the ANE state from within the app, so users do not
have to reboot the device?
Is there anything specific we should capture in a Feedback Assistant report to
make this actionable? We can reproduce it in the field but not on demand.
0
0
205