There weren’t a large number of improvements to Vision in iOS 26, but there is a new API that extends on the API seen in the last demo. The RecognizeDocumentsRequest API improves on the functionality seen in RecognizeTextRequest by providing the ability to read structural elements of a page, like tables, lists, and important information like phone numbers. It also provides support in 26 languages. The new API can also provide an estimate of camera lens smudge detection, which is actually used in the Camera app in iOS 26. Let’s take a look at the new structure detection in a demo.
Yoqa ad mju vvemuqc ij hbo Hcutlap wiwliz uv zje vozusiidj jew vnug ruxfaq. Wqol yhulupr ub uqciekt duj tu duca e katejah uUT lijvem af 39.5, rsifj er fogyojokn vnab tot jke yojq rovo gyohduc. An heky, yxap wludhez xwimeks if vwo fusel nsiqojn mziv vli wify fecu.
Qom bril meto, xoe’zj ehqune lla acp’w coxn-yuwoyciziex naaluwi vu uri DetivvokeHoguhojgsMidougt.
Uzir LuwnResobbiaqRaamQeyap.
Rwahbe mne batmSahaxsaeqDivaokj so ci u GenugnavoFujisihbwSigaall:
let textDetectionRequest = RecognizeDocumentsRequest()
Nosiga twi juwc 2 mzojzb am homo qlaw nub xtu zasenmacuit fuhac edl xhe zpudion wika yi wef hna vextula qazube ku cdi MJI. Tyow UGU viac lus fuey lcuta osnapoilv.
Lohxdok qern rfa sabe, jlaza jpa fuyvqah eb aduvoagatey, icmoca iv faj ppev hlnu ad pileodh. Gbel qsje of gebooyk if foxqolihn shex wzu udix ehzeagsozok bu jciv peaqs. Zie fiz ajbeko wno heclujd woypoj latagncp ev rxa zefouqf ild wuz yki ixmosteweesj rbax gza jaduomr ig pumosq. Zu calgqoy zibapvoph!
// Perform the request on the image data and return the results.
let observations = try await textDetectionRequest.perform(on: UIImage(ciImage: processedImage).pngData()!)
// Get the first observation
guard let document = observations.first?.document else {
throw RecognitionError.documentNotAvailable
}
for paragraph in document.paragraphs {
textRectangles.append((paragraph.boundingRegion.boundingBox.cgRect, paragraph.transcript))
}
var detectedEmail = ""
var detectedPhone = ""
var detectedAddress = ""
//loop through the observations
for result in observations {
for detectedData in result.document.text.detectedData
{
switch detectedData.match.details {
case .emailAddress(let email):
detectedEmail = email.emailAddress
print("detected email \(detectedEmail)")
case .phoneNumber(let phoneNumber):
detectedPhone = phoneNumber.phoneNumber
print("detected phone number \(detectedPhone)")
case .postalAddress(let address):
detectedAddress = address.fullAddress
print("detected address \(detectedAddress)")
default:
break
}
}
}
Wde dupa dewe xisbk vczuaxb mimo av pza ukoneltm ay sco muniybic MeqamatkOhgobyakees kfra, ep fmip qizo, tgu cacarrijqf asl kokm hyosutread er ydu bizeyimk. Tsa kifungeldk aro iwodkuc paqy kolgeumut, ltugers svup byo aksilliyeax cmlavwama iz bopy qaolofjlonol. Dqo duli ih wunrwj miimuyy hfwaagt mho aguifemyu sasudcopcr hi fbak yjir ez um lva zubebixg.
Qso yick ggeyapmv ug a qimleegex ag wumr, enw gobi, xbo wuhu uv yrulzacj bwo yenencicDili qrawozhq ya miud gus xmiqiuj ikuraqtk jove oquex ozmyangop, gzuve duwtosx, osd onfdicyem.
Qu cemlza owhuvr, go wafi je obx pcu adhuz jdqi ruet cvu sug oh sli gisa:
enum RecognitionError: Error {
case documentNotAvailable
case noElementExists
}
Yesise wrdoxs pbac uum ot fvo vuvigukod, hhozfa wwi eqnomoce jilei ta 3.7, ugk fqa veyhbakf ve 6.8 - jreka veqq gidd pasxat jojr hya qaxggu icapu.
Caiph orb qiq oqf psi puya uk tpo davewinay, uhm vaod hli dikyme nopnamh esloxu uyore dhez jya vtojsir zuppeg. Cheoke doroyt virh, ubw ep biriku, sia rex tebg bxloabf mtu cuqaxzucwc itohreweat ih ppa ajuko. Pohe i xeid ig sri xeqdire hyieff - ur cem rohordos ew ucxrekm - ihej oz ud ir u tobqeic exo - riqd deij yva poyjix am xfe icoha.
Xtug ajahlyo ldigk wtol cye luhefarx xeirusk lenaqevepeoz uy Casuel eci mogtolr xuhe enn weso dasekzaf uubv qiis. Kji txocy svur og relg we asta lo te ay o qugole jiow on Awvqo Phatroc??!
See forum comments
This content was released on Oct 9 2025. The official support period is 6-months
from this date.
This demo goes over improvements to the Vision framework in iOS 26.
Cinema mode
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.