Installation
Requirements
Minimum deployment target: iOS 13.0
Supported architectures:
- XCFramework (Download, Cocoapods, SPM): iPhoneOS arm64, iPhoneSimulatorOS arm64 and x86_64
- Framework (Download): iPhoneOS arm64 and iPhoneSimulatorOS x86_64
Bitcode is no longer supported by Apple and has therefore been removed from the Scanbot SDK
Compatible programming languages: Objective-C and Swift
Distribution
ScanbotBarcodeScannerSDK is available as an XCFramework
, as a static framework
(deprecated), via Swift Package Manager (SPM)
and via CocoaPods
.
Use one of the XCFrameworks if possible. XCFrameworks contain all supported architectures and are thinned automatically when uploading your app to appstoreconnect.com. Frameworks are deprecated, due to their inability to run natively on Apple Silicon simulators. When uploading your app to appstoreconnect.com you must strip the framework's x86_64 architecture.
ScanbotBarcodeScannerSDK is published via
- Direct download as XCFramework: ScanbotBarcodeScannerSDK.xcframework
- Direct download as Framework (deprecated): ScanbotBarcodeScannerSDK.framework
- CocoaPods (XCFramework): 'ScanbotBarcodeScannerSDK'
- Swift Package Manager (XCFramework): ScanbotBarcodeScannerSDK
Installation
- How to install using CocoaPods
- How to install as an XCFramework with Xcode 11 or later
- How to install via the Swift Package Manager
- How to install as a standard embedded framework (deprecated)
Installation using CocoaPods
CocoaPods is a dependency manager for Swift and Objective-C projects for macOS as well as for iOS. It integrates deeply into your Xcode project and manages the third-party components in your application.
- If not already done, install CocoaPods on your Mac
- Add Pods to your Xcode project as described in this guide
- Modify your
Podfile
to include theScanbotBarcodeScannerSDK
Pod as described here
Open your Podfile
in Xcode or with any text editing application and add the following line:
pod 'ScanbotBarcodeScannerSDK'
Your Podfile
should now read as follows:
target 'SDKPodTest' do
...
use_frameworks!
pod 'ScanbotBarcodeScannerSDK'
...
end
Save the Podfile
and run the
$ pod install --repo-update
command in your project folder using the macOS Terminal.
Open your application's Xcode workspace (not the project file). You should now be able to use Scanbot Barcode Scanner SDK in your project.
Installation as an embedded XCFramework (Xcode 11+ only)
Installing the ScanbotBarcodeScannerSDK
XCFramework is very easy. Check out our step-by-step guide.
- Copy the folder containing
ScanbotBarcodeScannerSDK.xcframework
into your app's project folder - Open your app project in Xcode
- Select your app's build target and drag the XCFramework into it
Step-by-step XCFramework installation guide
Step 1
Copy the folder containing ScanbotBarcodeScannerSDK.xcframework
into your app's project folder.
Step 2
Open your app project in Xcode.
Step 3
Navigate into the ScanbotBarcodeScannerSDK
folder and drag ScanbotBarcodeScannerSDK.xcframework
into your project's Frameworks, Libraries and Embedded Content
section.
Import
Now you should be able to import the framework's umbrella header in your source code and start using it.
- Swift
- Objective-C
import ScanbotBarcodeScannerSDK
#import <ScanbotBarcodeScannerSDK/ScanbotBarcodeScannerSDK.h>
Installation via Swift Package Manager
The Barcode Scanner SDK provides the ability to be integrated into your app via the Swift Package Manager (more about Swift Packages).
Installation guide
- In Xcode, go to File -> Add Packages...
- Paste a link to package https://github.com/doo/scanbot-barcode-scanner-sdk-ios-spm.git into the search bar
- Select the package
- Click Add Package
Installation as an embedded framework (deprecated)
You can install the ScanbotBarcodeScannerSDK manually as an embedded framework by applying the following steps:
- Unzip the downloaded SDK archive file and copy the folder containing the ScanbotBarcodeScannerSDK.framework into your project folder
- Open your project in Xcode
- Select your build target and add an embedded framework
- Select 'Add Other...'
- Locate and select
ScanbotBarcodeScannerSDK.framework
- Check 'Copy items if needed' and 'Create groups', then hit 'Finish'
- Add a runscript build phase that runs the strip-script and set the dSYM file as the input file to this runscript phase
Step-by-step guide
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Script code:
bash "$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH/ScanbotBarcodeScannerSDK.framework/strip-SBSDK-Framework.sh"
Script input file:
$(SRCROOT)/./ScanbotBarcodeScannerSDK/dSYMs/ScanbotBarcodeScannerSDK.framework.dSYM
Want to scan longer than one minute?
Generate a free trial license to test the Scanbot SDK thoroughly.
Get your free Trial LicenseWhat do you think of this documentation?
What can we do to improve it? Please be as detailed as you like.