iOS Quickstarts
Each quickstart is a small SwiftUI app that does exactly one thing with the Aila SDK. They are meant to be read in a few minutes. They all live in one Xcode project, one app target each, so you can open the project, pick a scheme, and run.
The quickstarts
| Quickstart | What it shows | Needs |
|---|---|---|
| Minimal Barcode | Initialize the SDK, pick symbologies, receive scans. No camera preview. | Standard symbologies |
| Barcode with Preview | Same scanning with an AilaCaptureView camera preview in SwiftUI. | Standard symbologies |
| Multi-Scan | Multi-scan mode, duplicate filtering, and resetting the scan session. | Standard symbologies |
| MRZ Scanning | Read a passport or ID MRZ and parse the returned JSON. | MRZ entitlement |
| MRZ with Guides | MRZ scanning with a camera preview and alignment guides. | MRZ entitlement |
| MRZ Detection | React to early MRZ detection, show the camera only when needed, dim kiosk LEDs. | MRZ entitlement |
| Driver's License Parsing | Parse a US driver's license PDF417 into named fields. | DL Parsing entitlement |
| ID Tray | Detect an ID-1 card in the tray and capture an image. | Interactive Kiosk with ID Tray |
| Diagnostics | Hardware and SDK info plus a live, exportable SDK log console. | Standard symbologies |
Every quickstart runs on an iPhone or iPad with no Aila hardware. Standard symbologies are included in every license and covered by the 250-scan allowance described below. The MRZ and DL Parsing quickstarts still build and scan barcodes without their entitlement, but the feature they demonstrate needs it. ID Tray needs the kiosk accessory to do anything.
Download the source
The download contains the Xcode project and Swift source only. Before you build, sign in to the Aila Developer Portal, download the iOS SDK, and copy Aila.xcframework and AilaDecoder.xcframework into the AilaQuickstarts folder next to AilaQuickstarts.xcodeproj. The project already references both frameworks at that location.
Set up and run
- Unzip the download and add the two frameworks as described above.
- Open
AilaQuickstarts.xcodeprojin Xcode 15 or later. - Pick a quickstart from the scheme menu. Each one has a shared scheme.
- Select the app target, open Signing & Capabilities, and choose your team. The targets ship with no team set.
- Run on a physical device.
Licensing
Either call Aila_ReadLicense with your license key provided by Aila, or use Cloud licensing.
To use cloud licensing point the app at a bundle ID your organization has registered:
- In Xcode, select the target and open Signing & Capabilities.
- Change Bundle Identifier from
com.aila.quickstarts.<Name>to a bundle ID registered in your organization's configuration. - If you need to add a new bundle ID, follow Editing bundle IDs in the Portal Documentation.
The SDK picks up the entitlements for that bundle ID on its own.
How each quickstart is laid out
The folders all follow the same shape.
App.swiftis the@mainentry point and does nothing else.View.swiftis the SwiftUI view. It starts scanning inonAppearand stops inonDisappear.ViewModel.swiftholds every Aila SDK call. If you only read one file per quickstart, read this one.AilaCaptureViewRepresentable.swiftappears only where a camera preview is shown. It wraps the UIKitAilaCaptureViewfor SwiftUI.Info.plistincludes theNSCameraUsageDescriptionthe SDK needs to open the camera.
Quickstarts-Bridging-Header.h is shared by every target and imports the Aila headers into Swift.
The code blocks on each quickstart page are pulled from the same files that are in the zip, so what you read here is what you download.
Where to go next
- Getting Started for framework installation in your own app
- API Reference for every function and class used in the quickstarts
- Supported Formats for the full symbology list