{"id":22170185,"url":"https://github.com/adyen/adyen-barcoder-ios","last_synced_at":"2025-07-26T13:32:51.662Z","repository":{"id":56901619,"uuid":"84306544","full_name":"Adyen/adyen-barcoder-ios","owner":"Adyen","description":"Use Verifone Barcode scanner over MFi","archived":false,"fork":false,"pushed_at":"2023-12-15T14:59:38.000Z","size":3074,"stargazers_count":30,"open_issues_count":5,"forks_count":16,"subscribers_count":18,"default_branch":"main","last_synced_at":"2024-12-01T01:33:04.103Z","etag":null,"topics":["barcode-scanner","cocoapods","mfi","verifone"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Adyen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-03-08T10:08:21.000Z","updated_at":"2024-03-21T02:33:03.000Z","dependencies_parsed_at":"2024-01-16T10:37:17.329Z","dependency_job_id":"bd4885c0-b190-46bf-9a4d-a3a3b2e09a75","html_url":"https://github.com/Adyen/adyen-barcoder-ios","commit_stats":{"total_commits":116,"total_committers":8,"mean_commits":14.5,"dds":"0.27586206896551724","last_synced_commit":"68a2b037083dbb5fa3652f2b784c64d42d339d5a"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-barcoder-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-barcoder-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-barcoder-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-barcoder-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adyen","download_url":"https://codeload.github.com/Adyen/adyen-barcoder-ios/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227685883,"owners_count":17804134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["barcode-scanner","cocoapods","mfi","verifone"],"created_at":"2024-12-02T06:39:29.086Z","updated_at":"2024-12-02T06:39:30.561Z","avatar_url":"https://github.com/Adyen.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AdyenBarcoder\nUse Verifone Barcode scanner over MFi.\n\n## Requirements\niOS 8.0 or higher.\n\n## Installation\n\n### Cocoapods\n\n1. Add `pod 'AdyenBarcoder'` to your `Podfile`.\n2. Run `pod install`.\n\n### Carthage\n\n1. Add `github \"adyen/adyen-barcoder-ios\"` to your `Cartfile`.\n2. Run `carthage update`.\n3. Link the framework with your target as described in [Carthage Readme](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application).\n\n### Manual\n\nCopy files from `AdyenBarcoder` folder.\n\n## Usage\n\nYou need to add `com.verifone.pmr.barcode` in the `Supported external accessory protocols` into `Info.plist` file\n\n### Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n### Initializing\n\nTo initialize Barcoder library simply get the shared instance and set your `BarcoderDelegate`.\n```swift\nlet barcoder = Barcoder.sharedInstance\nbarcoder.delegate = self\n```\n\n### BarcoderDelegate\n\nThe only mandatory method is `didScan(barcode:)`. This is where the result of the scan will be delivered. You can also receive state updates on `didChange(status:)`.\n\n```swift\n@objc public protocol BarcoderDelegate {\n    @objc func didScan(barcode: Barcode)\n    @objc optional func didChange(status: BarcoderStatus)\n    @objc optional func didReceiveLog(message: String)\n}\n```\n\n### BarcoderMode\n\nBarcoder library supports four modes:\n\n```swift\n@objc public enum BarcoderMode: Int {\n    case hardwareAndSofwareButton // Default mode. Both hardware button and software commands (startSoftScan, stopSoftScan) are enabled.\n    case hardwareButton // Only hardware button is enabled. Calls to software commands will be ignored.\n    case softwareButton // Only software commands are enabled. Clicking the hardware button will not trigger the lights.\n    case disabled // Disabled.\n}\n````\n\nYou can set the mode via the `mode` variable on `Barcoder.sharedInstance`. The default value is `.hardwareAndSofwareButton`.\n\n### SoftScan\n\nFor starting a soft scan:\n```swift\nbarcoder.startSoftScan()\n```\n\nTo stop the soft scan:\n```swift\nbarcoder.stopSoftScan()\n```\n\n#### Important: Remember to allways call `stopSoftScan` after starting a `startSoftScan`.\n\n### Logging\n\nThere are five log levels available: None, Error, Info, Debug, Trace.\nTo set the log level simply set the variable on your `Barcoder` instance:\n```swift\nbarcoder.logLevel = .debug\n```\nYou will receive each new log message via `BarcoderDelegate` method `didReceiveLog(message:)`.\n\n## Advanced Usage\n\n### Interleaved 2 of 5\n\nYou can enable or disable setting the interleaved2of5 variable on `Barcoder` instance:\n```swift\nbarcoder.interleaved2Of5 = true\n```\n\n### Custom Symbology\nIt's possible to customize the barcoder symbology with `setSymbology(enabled:)` method:\n```swift\n//Should be called AFTER .ready event on `didChange(status:)`\nbarcoder.setSymbology(.EN_CODE11, enabled: true)\n```\nThe full list of accepted symbology can be found on `SymPid` enum.\n\n## Example usage in Objective-C\n\n```obj-c\n//\n// Do not forget to put in Podfile:\n// use_frameworks!\n// pod \"AdyenBarcoder\"\n//\n// And put in Info.plist file:\n// \"com.verifone.pmr.barcode\" in the \"Supported external accessory protocols\"\n\n#import \u003cAdyenBarcoder/AdyenBarcoder-Swift.h\u003e\n\n@interface ViewController () \u003cBarcoderDelegate\u003e\n@end\n\n@implementation ViewController\n\n- (void)viewDidLoad {\n    [super viewDidLoad];\n\n    // Initialize\n    [Barcoder sharedInstance].delegate = self;\n}\n\n// Did scanned\n- (void)didScanWithBarcode:(Barcode * _Nonnull)barcode {\n    NSLog(@\"Scanned barcode: %@\", barcode.text);\n}\n\n@end\n```\n\n## Support\nIf you have any problems, questions or suggestions, create an issue here.\n\n## Licence\nMIT license. For more information, see the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadyen%2Fadyen-barcoder-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadyen%2Fadyen-barcoder-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadyen%2Fadyen-barcoder-ios/lists"}