Quick start for the iOS Barcode Scanner SDK
- Portrait
- Landscape




In this section, you'll learn how to set up the Scanbot Barcode Scanner SDK for iOS in your app, with Barcode Scanning enabled, all within 10 minutes — thanks to our Ready-to-Use UI!
Installing the Scanbot SDK
You can integrate the Scanbot SDK into your app using the Swift Package Manager.
Alternatively, you can also install the Scanbot SDK using CocoaPods or as an embedded framework. See Installing the SDK for further details.
To get the latest version of the Scanbot SDK, please refer to the SDK's changelog.
Installation via Swift Package Manager
- In Xcode, go to File -> Add Package Dependencies...
- Paste a link to the package https://github.com/doo/scanbot-barcode-scanner-sdk-ios-spm.git into the search bar.
- Select the package.
- Click Add Package.

Add camera permission
To ensure your app is ready to use the ScanbotBarcodeScannerSDK, it's essential to request camera access by adding the NSCameraUsageDescription key to your Info.plist file.
This step is necessary for the SDK to function properly, as it requires access to the device's camera for scanning barcodes.
Follow these steps to add the camera usage description:
- Open your
Info.plistfile. - Click the + button and start typing
Privacy - Camera Usage Description. - Provide a brief, user-friendly explanation of why your app needs camera access, such as:
Please allow camera usage to scan barcodes.
For more details on requesting authorization to capture and save media, refer to the Apple documentation.
Initialize the SDK
To activate the license in the code, use the Scanbot.setLicense(_:) method of the Scanbot class.
Call this method as early as possible in your app's runtime, before you use any Scanbot SDK feature. In a UIKit app, a good place is the scene(_:willConnectTo:options:) method of your scene delegate. In a SwiftUI app, set the license in your app type's init() method.
If your license has expired, any invocation of the SDK's API will not work.
You can check for license expiration during runtime by using the Scanbot.isLicenseValid property.
Example code for setting the license key string:
- UIKit
- SwiftUI
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
Scanbot.setLicense("YOUR_SCANBOT_SDK_LICENSE_KEY")
}
@main
struct YourApp: App {
init() {
Scanbot.setLicense("YOUR_SCANBOT_SDK_LICENSE_KEY")
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
Without a license key, the SDK runs for one minute per app session. After that minute, all SDK features and UI components stop working. To test longer, get a trial license and pass the license key to Scanbot.setLicense(_:) as shown above. For license checks at runtime, see License handling.
Start the Barcode Scanner and process the result
With just a few lines of code, the Scanbot Barcode Scanner Ready-to-Use UI Component SBSDKUI2BarcodeScannerViewController can be integrated into your
application's workflow. It's as simple as starting any regular iOS View Controller.
- UIKit
- SwiftUI
loading...
loading...
🚀 That's it! 🚀 You have successfully integrated a full-featured barcode scanner as an RTU UI component into your app.
💡 Customization: In this Quick Start guide, we use the default configuration for the scanner UI.
Feel free to explore the configs and customize the UI and behavior according to your needs via
the BarcodeScannerScreenConfiguration class.
For more details, please refer to the Ready-to-Use UI section.
Want to scan longer than one minute?
Generate a free trial license to test the Scanbot SDK thoroughly.
Get free trial licenseScanbot SDK is part of the Apryse SDK product family
A mobile scan is just the start. With Apryse SDKs, you can expand mobile workflows into full cross‑platform document processing. Whether you need to edit PDFs, add secure digital signatures, or use a fast, customizable document viewer and editor, Apryse gives you the tools to build powerful features quickly.
Learn more
