Commit fc242631 authored by Alexander Sorokin's avatar Alexander Sorokin Committed by Vladimir Kotikov

(iOS) Save each generated QR code to a different file

parent ea482ff5
......@@ -832,7 +832,8 @@ parentViewController:(UIViewController*)parentViewController
CGImageRelease(cgImage);
/* save image to file */
NSString* filePath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"tmpqrcode.jpeg"];
NSString* fileName = [[[NSProcessInfo processInfo] globallyUniqueString] stringByAppendingString:@".jpg"];
NSString* filePath = [NSTemporaryDirectory() stringByAppendingPathComponent:fileName];
[UIImageJPEGRepresentation(qrImage, 1.0) writeToFile:filePath atomically:YES];
/* return file path back to cordova */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment