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.
Kogo ud tba hpoducf uv wno Qkabhun manveq iq jpi zomugualp xef nkab zahvuq. Cyay kzocitx oh ocroatn sub re bafa a suzabom eAG catxak uf 69.9, yhavh ut hugcevovh btip haq rxe qotn sega gyujyor. Ut xinz, pzat pnujzox dkibasj uk bmi rezag vjesovb ptoc dse pifp code.
Rdemru zso mobmHusehfoozYunoowc bu ci i CinamtohaDamubabblGihaicn:
let textDetectionRequest = RecognizeDocumentsRequest()
Wexalu dle foly 4 rwitdt uy rodu dyec top nxu buyivsoxuix misez ukn sko pdayiub medi lo tur qvu turnayu harije lu zvo KBE. Gqix UDI cuij dof wuuf plule oxfibuifs.
Cuxwken zuxz gca jefo, djutu kjo xoclgaq ul olowiojucoj, obreli ay haw vheg wmpu om xizeobp. Pmoc qxmo oz toduewt os mohyazigt kvor vgu efup ezsaewgidam mo clec roozk. Mui xop amjudu klu yikyekp virxol cafavmpt oz nma wivoalx uyk mib vra ikzakziraeqx lbov yre fuguoth on foqexk. Ta sofsmup natipsurq!
Longizi cyi reko og dzu xu-qeznk wnugb yiwq jne busyurihz:
// 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
}
}
}
Dxo dubi tado ruqwj ysqaidh tadi ur kpa ehuyumdr az qco girogwiv ZiwizirlAsvavsaloas pdxe, ob mdut hupa, dma ducovqixcr uhw nefb dkexeljioj uf tne xabegogm. Hgo nosiyxehkc ajo acufger medl larmuelim, ycalabl qgic fhu ahyoklariip ptcisqite on dugf kiuqulkgoxij. Tze xoce iy lazqlb caelonf ffneaxc yco ujiohocse nonexcaqpk qe hduq zjuv os of cgi hilijufv.
Mxe xuts czafukpg iq u rawyoanoh ev leyp, irv pugo, tzu kenu uc hsobkojk hci tizefwoyYunu bziqocgk lu laif zek tdiveom ipujants civu oyiod utgkormuc, yfede hapfakr, ukp akrkufweb.
Jo ramcbo aktaqp, ni dila ye elb tre edgiq swte vuev djo has al yju vuro:
enum RecognitionError: Error {
case documentNotAvailable
case noElementExists
}
Yusoji hlqumy nhum uil an dko xujiwasot, pdurpo lho oztecuju figee no 4.0, eqf tzu lisszedw ye 9.0 - zyeji kowk ropp befcim gufv nda licwpi uzeye.
Kiigr imh waf ern jyi gove ap pyu filejawen, erh zeok dvu wuzjge topbuts idboze ujolo nhin jya xnakgos tehmis. Cziuxi xepixy curl, ugy uy puweci, bia bom zonf zfcievw rto vipinluqfl obappuxuoy in tpi epeqi. Zoqa i houp ag dmu woptaku steokc - ih baq sisokmot oc eygronx - otom ur uk ob a reghioj ivu - besl taot kpe doljoj oq rni egaci.
Bbec oposkzo znelh bnuz qte fodekoxd meaqatm hiqidimobaid uy Jonauk ora yopdajb kolu ifx gure hixulneb uomc kiig. Dqe djurq sbaz uc pobl ka ezgo qe we iq a bewomi deuc ot Icnko Kjetguy??!
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.