> Markdown version of [/videos/167-let-your-ios-app-read-texts](https://www.wearedevelopers.com/videos/167-let-your-ios-app-read-texts). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Let your iOS app read texts Add offline OCR to your iOS app in just a few lines of code. Discover how Swift's Vision framework extracts real-world text while completely preserving user privacy. - **Speakers:** Milan Todorovic - **Event:** World Congress 2021 - **Published:** June 30, 2021 - **Duration:** 36:34 - **URL:** https://www.wearedevelopers.com/videos/167-let-your-ios-app-read-texts ## Summary This session demonstrates how ios developers can seamlessly integrate precise optical character recognition into their applications using the vision framework and swift. By bypassing the need to build a custom engine from scratch, the vision framework allows developers to extract text from images, camera feeds, and real-world documents in just a few lines of code. The process starts by connecting an image to a request handler, passing a command through an instance of vnrecognizetextrequest, and evaluating the resulting text candidates to find the most accurate string. A deep dive into the framework reveals a core trade-off between the fast and accurate recognition modes. The fast approach identifies text letter-by-letter with a low memory footprint, making it ideal for reading barcodes, real-time codes, or serial numbers. In contrast, the accurate approach relies on deep learning and neural networks to read whole words, easily bypassing errors in natural language, reading rotated text, and handling non-standard fonts. Developers can further increase transcription precision by incorporating custom lexicons for domain-specific vocabularies. Through practical demonstrations involving book pages, business cards, non-latin receipts, and handwritten notes, developers gain actionable insight into structuring their scanning flows. A major implicit takeaway is that all of this sophisticated text and image classification processes natively on-device, preserving data privacy and ensuring rapid, offline responses. **Keywords:** apple vision framework, ios text extraction, swift programming, optical character recognition, vnrecognizetextrequest, neural network text scanning, real-time character detection, on-device data processing, custom lexicons, mobile app privacy, document scanning implementation, offline image classification, business card scanning, xcode environment ## Chapters 1. **Introduction to text recognition with the Vision framework** (00:02) — Integrating modern optical character recognition capabilities into native iOS applications using Swift. 1. **Processing native image data with Vision framework request handlers** (03:58) — Handling document pipelines by connecting camera snapshots and image galleries to algorithmic request handlers. 1. **Implementing recognized text requests and handling candidate outputs** (08:00) — Generating specific code commands that return structured observation arrays for categorizing readable string alternatives. 1. **Trade-offs between fast and accurate text recognition levels** (10:12) — Balancing immediate asynchronous performance metrics with processor-heavy deep learning neural networks. 1. **Configuring custom lexicons for domain-specific text recognition accuracy** (13:36) — Improving string reading probability and logic by passing domain custom vocabularies into language transcription correctors. 1. **Demonstrating text recognition from books, business cards, and receipts** (17:12) — Seeing the framework independently capture real world variables across printed pages, contact cards, and bilingual sales receipts. 1. **Extracting characters from organic and messy handwritten text inputs** (25:55) — Testing the natural boundaries of digital optical extraction models against imperfectly shaped unstructured human lettering. 1. **Reviewing Xcode implementations and Vision framework documentation reference resources** (27:25) — Exploring Swift file components and navigating the Apple developer ecosystem libraries to discover and extend algorithmic features. 1. **Evaluating on-device data privacy, model performance, and cross-platform alternatives** (29:33) — Discussing the inherent security of zero network architecture and contrasting internal Vision processing speeds against Google light models. ## Related Moments - [Introduction to the Apple Vision framework](https://www.wearedevelopers.com/videos/135-detect-hand-pose-with-vision) (from "Detect Hand Pose with Vision") - [Extracting text from images using the Mac OCR tool](https://www.wearedevelopers.com/videos/1909-wearedevelopers-live-back-to-code100) (from "WeAreDevelopers LIVE - Back to CODE100") - [Implementing machine learning with Core ML and Vision](https://www.wearedevelopers.com/videos/1515-harnessing-apple-intelligence-live-coding-with-swift-for-ios) (from "Harnessing Apple Intelligence: Live Coding with Swift for iOS") - [Testing the AI generated Apple iOS Flashcards application](https://www.wearedevelopers.com/videos/100195-xcode-development-redefained) (from "Xcode development redefAIned") - [Relying on artificial intelligence for captions and environment mapping](https://www.wearedevelopers.com/videos/1318-wearedevelopers-live-can-ai-save-accessibility-horrid-html-the-frontend-treadmill-and-more) (from "WeAreDevelopers LIVE - Can AI save Accessibility?; Horrid HTML; The Frontend Treadmill and more") - [Navigating Apple's evolving on-device AI and machine learning stack](https://www.wearedevelopers.com/videos/100225-edge-ai-on-ios-beyond-the-cloud-designing-the-next-generation-of-intelligent-on-device-apps) (from "Edge AI on iOS: Beyond the Cloud, Designing the Next Generation of Intelligent On-Device Apps") ## Related Articles - [What’s in The box? – Unboxing The DeepFace](https://www.wearedevelopers.com/magazine/117-what-s-in-the-box-unboxing-the-deepface) - [Dev Digest 118 - not a total recall](https://www.wearedevelopers.com/magazine/452-dev-digest-118-not-a-total-recall) - [Dev Digest 138 - Are you secure about this?](https://www.wearedevelopers.com/magazine/486-dev-digest-138-are-you-secure-about-this) - [Why Developers are So Excited About Pretext](https://www.wearedevelopers.com/magazine/724-why-developers-are-so-excited-about-pretext) ## Related Jobs - [Founding Mobile Engineer (iOS)](https://www.wearedevelopers.com/jobs/ext/1648532-founding-mobile-engineer-ios) at **Almedia** - [Digital Forensic Analyst](https://www.wearedevelopers.com/jobs/ext/1271949-digital-forensic-analyst) at **ZEISS Group** - [iOS Engineer, Swift/SwiftUI/Combine (B2C Broker)](https://www.wearedevelopers.com/jobs/ext/1611832-ios-engineer-swift-swiftui-combine-b2c-broker) at **Bitpanda** - [Digital Forensic Analyst](https://www.wearedevelopers.com/jobs/ext/1982266-digital-forensic-analyst) at **ZEISS Group** - [AI Software Engineer (Germany)](https://www.wearedevelopers.com/jobs/48317-ai-software-engineer-germany) at **Sunhat** - [Engineer, Offensive Security Organization](https://www.wearedevelopers.com/jobs/ext/1992296-engineer-offensive-security-organization) at **Twilio**