Aspose.BarCode for Cloud
Aspose.Barcode Cloud is a REST API for barcode generation and recognition. It helps you generate barcode images from scratch in linear (1D), two dimensional (2D), and postal formats. Generate barcode images in a variety of image formats: JPEG, PNG, GIF, BMP, TIFF and many others. Recognize barcodes from different image types. Aspose.Barcode Cloud allows you to control all aspects of the image and barcode when generating barcode images. Specify image width, height, border style, output image format and more. You can also set barcode attributes like font style, font color, background color, barcode type and the barcode text location.
Adding Aspose.BarCode for Cloud to your project
• CocoapodsCocoaPods is the recommended way to add AsposeBarCodeCloud to your project.
- Add a pod entry for AsposeBarCodeCloud to your Podfile
pod 'AsposeBarCodeCloud'
- Install the pod(s) by running
pod install
- Include AsposeBarCodeCloud wherever you need it with
#import "ASPBarcodeApi.h"
• Source filesAlternatively you can directly add source files to your project.
- Download the latest code version from GitHub or CodePlex repository.
- Open your project in Xcode, then drag and drop barcode folder onto your project (use the “Product Navigator view”). Make sure to select Copy items when asked if you extracted the code archive outside of your project.
- Include AsposeBarCodeCloud wherever you need it with
#import "ASPBarcodeApi.h"
UsageAn example is given below to give you a quick preview of how APIs of this SDK can be called.
/*Generate barcode.*/
#import "ASPApiClient.h"
#import "ASPBarcodeApi.h"
//Get App key and App SID from https://cloud.aspose.com
[ASPApiClient setAppKey:@"" andAppSID:@""];
ASPBarcodeApi *barcodeApi = [[ASPBarcodeApi alloc] init];
[self.barcodeApi getBarcodeGenerateWithCompletionBlock:@"Dairy Products"
type:@"qr"
format:@"png"
resolutionX:nil
resolutionY:nil
dimensionX:nil
dimensionY:nil
enableChecksum:nil
completionHandler:^(NSURL *output, NSError *error) {
BOOL isFileExist = [[NSFileManager defaultManager] fileExistsAtPath:[output path]];
XCTAssertTrue(isFileExist, @"Failed to generate barcode.");
}];