Menu

The iOS Simulator has no camera: how I filmed a barcode scanner demo anyway
📰

The iOS Simulator has no camera: how I filmed a barcode scanner demo anyway

DEV Community: ios·Apoorv Darshan·1 day ago
#efI6mSCe
#devtoios#devto#dev#if#endif
Long article (736 words) — no AI summary yet.
Reading 0:00
15s threshold

The third short about Fud AI , my open-source food diary, is about the one logging feature that uses no AI at all: scan a packet's barcode and the nutrition fills itself in. A blueberry asks a granola cluster how many calories it is. The granola has no idea, but it does have a barcode.

The problem: the Simulator has no camera

I record app footage in the iOS Simulator, because every take is clean and repeatable. A barcode scanner is the one screen that can't be recorded that way: there is no camera to point at a packet.

So I split the feature at its natural seam:

The scan is a cartoon. The blueberry holds a phone up to a barcode sticker on the granola, a red line sweeps the frame and a beep plays. Nobody will mistake that for app footage, which is the point.

Everything after the scan is the real app. For the recording I added a capture-only launch argument to a throwaway copy of the app. It passes a barcode number to the same function the scanner calls when it reads a code.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.