How to Add a Camera and Scanning to an iPhone App (2026)
Add the camera to an iPhone app without code: photos, live text, QR and document scanning, the photo picker, permissions, and the steps with Borel.

By Sigsten Gustavii· · 8 min read
To add a camera to an iPhone app, decide what the camera is for (a photo, text, a code or a document), use the matching Apple framework, write a clear sentence for the camera permission prompt, offer the photo library when there is no camera, and decide where pictures are stored. With Borel, you describe what the app should capture and it writes the Swift.
| Feature | Apple tool | Asks permission? | Example |
|---|---|---|---|
| Take a photo | The camera (UIKit or AVFoundation) | Yes, camera | A plant diary |
| Pick existing photos | PhotosPicker | No | Choosing a profile photo |
| Read text live | VisionKit's DataScannerViewController | Yes, camera | A recipe scanner |
| Scan QR codes and barcodes | VisionKit's DataScannerViewController | Yes, camera | Event check-in, a book catalogue |
| Scan a paper document | VisionKit's document camera | Yes, camera | A receipt keeper |
| Save a picture to Photos | Photos framework, add-only | Yes, add to Photos | Exporting a finished card |
The camera is the feature that most clearly separates a native iPhone app from a web page. It opens instantly, scans text and codes live, and finds the edges of a receipt the way the Notes app does. This guide covers which camera feature to use, Apple's permission rules, where photos should go, and the steps in Borel.
Choose the right camera feature
Most apps only need one of these, and picking the lightest one keeps the app simple and private:
- Need an existing photo? Use the photo picker. It runs outside your app, needs no permission, and only hands over the photos someone chooses. See photos.
- Need a new photo? Open the camera when someone taps a button.
- Need words from a page or label? Use the live text scanner instead of taking a photo and reading it later.
- Need a code? The same scanner reads QR codes and barcodes.
- Need a clean copy of paper? The document camera finds the page edges and flattens the scan.
Permissions: what Apple requires
Before an app uses the camera, iOS shows a prompt with a sentence the app provides, called a purpose string. Apple's Guideline 5.1.1(ii) asks that this sentence clearly and completely describes how the app uses the data, and 5.1.1(iii) asks apps to request only what they need, preferring the out-of-process picker over full photo library access.
| Weak | Good |
|---|---|
| "This app needs the camera." | "Take a photo of each plant so you can see how it grows." |
| "Camera access required." | "Scan the QR code on a ticket to check a guest in." |
| "We use your camera." | "Scan receipts into clean pages you can file by month." |
Borel writes a plain sentence for each permission the app's code uses and fills in any that would be missing, so the app never crashes for lack of one. Ask for the camera at the moment it's used, not when the app opens; people say yes far more often when they can see why.
Where photos should go
| Where | Good for | Trade-off |
|---|---|---|
| On the phone, in the app | Personal apps: diaries, collections, receipts | Not on other devices; free |
| The app's cloud storage | Sharing, syncing, social posts, listings | Needs an account; storage is pay as you go |
| The Photos library | Exporting something people want to keep | Asks to add to Photos |
In a Borel app, photos that go to the cloud are shrunk to a JPEG before upload and stored in the app's own file storage, with their address kept in the database. They are removed when the person deletes their account.
Scanning text and codes
Apple's VisionKit scanner reads printed text and codes live through the camera, on iPhones that support it. Typical uses:
- Recipes: point the camera at a cookbook page and keep the text.
- Labels and serial numbers: copy a Wi-Fi password or a model number without typing.
- QR codes: check in a guest, open a table's menu, or link a physical object to a record.
- Barcodes: catalogue books or products by their code.
Scanning happens on the phone, so the camera image isn't sent anywhere. Older iPhones without the scanner fall back to taking a photo or typing, which Borel's apps check for rather than crash on.
Design the capture screen
A camera screen is used with one hand, often in bad light. A few habits make it feel right:
- One obvious button to take the photo or start scanning.
- A preview before saving, with Retake next to Use photo.
- A frame or hint that shows where the text, code or page should be.
- A light haptic when a code is read, so people know without looking.
- A way out to the photo library and to typing by hand, for when the camera can't read something.
App ideas built around the camera
| App | Camera feature | Where the data goes |
|---|---|---|
| Plant or growth diary | Photo | On the phone, as a timeline per plant |
| Receipt keeper | Document camera | On the phone, sorted by month |
| Book or record catalogue | Barcode scanner and photo | On the phone, or shared with a club |
| Recipe scanner | Live text | On the phone |
| Event check-in | QR scanner | The app's cloud, so every door sees it |
| Marketplace listing | Photos | The app's cloud storage |
Testing the camera
The iOS Simulator has no camera. In Borel's simulator in your browser, the app offers the photo library instead, so you can test the rest of the flow. To try the real camera, scanner and document camera, install the app on your iPhone with Borel Companion, which comes with Pro; a free Apple ID is enough for that.
Test in the places people will really use it: a dim kitchen for a recipe scanner, a bright doorway for event check-in, a crumpled receipt for a receipt keeper. Each test usually suggests one small change, like a torch button or a bigger scanning frame, that you can ask for in a sentence.
Apple's rules for camera apps
| Guideline | What Apple asks | In a Borel app |
|---|---|---|
| 5.1.1(ii) Permission | A clear purpose string; consent before collecting | A plain sentence per permission, written for your app |
| 5.1.1(iii) Data minimisation | Request only what's needed; prefer the picker | PhotosPicker for existing photos, no library prompt |
| 5.1.1(i) Privacy policy | Say what you collect, including photos uploaded | Borel hosts a policy for the app |
| 1.2 User-generated content | Moderation if people share photos with others | Report and block from Borel's moderation kit |
Read the full text on Apple's App Review Guidelines page.
How to choose the right way to add a camera
- Borel, if you want native camera, scanning and photo picking in an iPhone app from a description, with permissions and storage handled.
- Xcode by hand, if you are a Swift developer and need a custom camera with manual focus, filters or video recording.
- [CatDoes](/compare/catdoes) or [a0](/compare/a0), if you build React Native apps for both stores; camera access there goes through Expo's modules.
How to do it with Borel, step by step
Step 1: Say what the camera is for
Add a Scan button to the recipes screen. It opens the camera's live text scanner; I tap the recipe's text on a cookbook page and it fills the ingredients and steps fields. Also let me add a photo of the finished dish, taken with the camera or picked from my photos. Keep photos on the phone.Rivet writes the scanner and camera code in Swift with VisionKit and the photo picker, adds the permission sentence, and falls back to the photo library when there is no camera.
Step 2: Test the flow in the simulator
In the simulator, the app offers the photo library in place of the camera. Pick a photo and check that it is saved and shown where you expect.
Step 3: Try the real camera
Install the app on your iPhone with Companion, scan a real page and take a real photo. Adjust in plain words, like "show a frame where the text should be".
Step 4: Publish
Stamp checks that every permission has a clear reason, and Publish builds and uploads the app under your Apple Developer account. More on camera and scanning.
The Bottom Line
Pick the lightest camera feature that does the job: the photo picker for existing photos, the camera for new ones, VisionKit for text, codes and documents. Explain each permission in one honest sentence, and decide where pictures live. Borel writes all of it natively from a description. Open your app in Borel, describe what it should capture, and try it on your own iPhone.
Questions people ask
How do I add a camera to an iPhone app without code?
Describe what the app should capture to Borel, for example "take a photo of each plant". It writes the camera code in Swift, the permission sentence and the storage.
Does my app need permission to use the camera?
Yes. iOS asks the person once, with a sentence your app provides, before the camera opens. Picking existing photos with PhotosPicker needs no permission at all.
Can an iPhone app scan QR codes and barcodes?
Yes, with Apple's VisionKit scanner on iPhones that support it. Borel apps check for support and offer another way in when it's missing.
Can an app read text from a photo or page?
Yes. VisionKit reads printed text live through the camera, on the phone, so a page, label or receipt becomes text without sending the image anywhere.
Can I test the camera in the iOS Simulator?
No, the simulator has no camera. Borel's apps offer the photo library there instead; test the real camera on your iPhone with Borel Companion.
Where are photos stored?
Wherever the app needs them: on the phone, in the app's cloud storage when they must sync or be shared, or saved to Photos when someone wants to keep a copy.
Can an app scan documents like the Notes app?
Yes. Apple's document camera finds the page edges and saves a flat scan, and Borel apps can use it.
Can the app record video?
Borel's camera features focus on photos, text, codes and documents. If video recording matters to your app, test it on your iPhone early before you build around it.
Will Apple reject an app for camera use?
Not for using it well. Rejections come from vague permission sentences or asking for access the app doesn't need, which is what Guideline 5.1.1 covers.
I started Borel because I wanted to make iPhone apps without a Mac or a team behind me. If this helped you build something, I would love to see it.
– Sigsten
Make your iPhone app in Borel
Describe the app you want and see its first screens before you pay anything.
See your app free