myang-git /
QR-Code-Encoder-for-Objective-C
An implementation of QR code encoder for Objective-C ported from Psytec library
67/100 healthLoading repository data…
zxingify / repository
An Objective-C Port of ZXing
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
ZXingObjC is a full Objective-C port of ZXing ("Zebra Crossing"), a Java barcode image processing library. It is designed to be used on both iOS devices and in Mac applications.
The following barcodes are currently supported for both encoding and decoding:
ZXingObjC currently has feature parity with ZXing version 3.3.3.
ZXingObjC requires Xcode 13.0 and above, targeting either iOS 11.0 and above, or Mac OS X 10.15 Catalina and above.
Encoding:
NSError *error = nil;
ZXMultiFormatWriter *writer = [ZXMultiFormatWriter writer];
ZXBitMatrix* result = [writer encode:@"A string to encode"
format:kBarcodeFormatQRCode
width:500
height:500
error:&error];
if (result) {
CGImageRef image = CGImageRetain([[ZXImage imageWithMatrix:result] cgimage]);
// This CGImageRef image can be placed in a UIImage, NSImage, or written to a file.
CGImageRelease(image);
} else {
NSString *errorMessage = [error localizedDescription];
}
Decoding:
CGImageRef imageToDecode; // Given a CGImage in which we are looking for barcodes
ZXLuminanceSource *source = [[[ZXCGImageLuminanceSource alloc] initWithCGImage:imageToDecode] autorelease];
ZXBinaryBitmap *bitmap = [ZXBinaryBitmap binaryBitmapWithBinarizer:[ZXHybridBinarizer binarizerWithSource:source]];
NSError *error = nil;
// There are a number of hints we can give to the reader, including
// possible formats, allowed lengths, and the string encoding.
ZXDecodeHints *hints = [ZXDecodeHints hints];
ZXMultiFormatReader *reader = [ZXMultiFormatReader reader];
ZXResult *result = [reader decode:bitmap
hints:hints
error:&error];
if (result) {
// The coded result as a string. The raw data can be accessed with
// result.rawBytes and result.length.
NSString *contents = result.text;
// The barcode format, such as a QR code or UPC-A
ZXBarcodeFormat format = result.barcodeFormat;
} else {
// Use error to determine why we didn't get a result, such as a barcode
// not being found, an invalid checksum, or a format inconsistency.
}
We highly recommend Carthage as module manager.
ZXingObjC can be installed using Carthage. After installing Carthage just add ZXingObjC to your Cartfile:
github "zxingify/zxingify-objc" ~> 3.6.9
CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. After installing CocoaPods add ZXingObjC to your Podfile:
platform :ios, '11.0'
pod 'ZXingObjC', '~> 3.6.9'
ZXingObjC includes several example applications found in "examples" folder:
ZXingObjC is available under the Apache 2.0 license.
Selected from shared topics, language and repository description—not editorial ratings.
myang-git /
An implementation of QR code encoder for Objective-C ported from Psytec library
67/100 healthfe9lix /
An Objective-C port of the $P gesture recognizer to be used in iOS applications.
58/100 healthTheLevelUp /
An Objective-C Port of ZXing
/100 healthKrishnaPatell /
KPDropMenu is an Objective-C port of HADropDown With Additional features
37/100 healthapps-guild /
An Objective-C port of Paper.js, see http://paperjs.org
43/100 healthlukhnos /
An Objective-C port of Lucene 5.x
19/100 health