Как сгенерировать штрих-код на Apple Watch с Watch OS2, я могу сделать это с помощью API, такого как ZXing на iOS, но мне интересно, есть ли способ сделать то же самое в watchOS2
NSError *error = nil;
ZXMultiFormatWriter *writer = [ZXMultiFormatWriter writer];
ZXBitMatrix* result;
//generate code 128 barcode
result= [writer encode:barCodeNumber
format:kBarcodeFormatCode128
width:500
height:500
error:&error];
if (result) {
CGImageRef image = [[ZXImage imageWithMatrix:result] cgimage];
return [UIImage imageWithCGImage:image];
}