- Open the main project or workspace in Xcode.
- Go to
File > Add Packages.... - Enter the URL for this repository (https://github.com/Calindra/eitri-ios-code-scanner) when prompted.
- Ensure the
EitriCodeScannerproduct is added to the main target.
To use this module some configurations are needed
Add the following key to the target's Info.plist with a user-facing explanation:
- Privacy - Camera Usage Description
import CodeScannerModule
// [...]
let eitriMachineContext = EitriMachineInstanceManager.start()
// get main eitri-machine instance
let mainEitriMachine = eitriMachineContext.mainMachine
// configure
mainEitriMachine.configure(
// configure params
)
//register modules
mainEitriMachine.modules.register(module: CodeScannerModule())