Hey, I have googled a lot and found very less material for how to implement a QR code reader in our iPhone app. Here I have integrated all material and implemented in my project.
So here I am sharing my experience of implementing a QR code reader in our iPhone app using ZBarSDK.
Step 1: Download ZBarSDK from here.
Step 2: Create a new project in xcode and name it as QRscanner.
Step 3: Integrate this ZBarSDK folder in your xcode project by drag and drop on equal level of class folder in left panel in xcode.
Step 4: Add these 7 frameworks in Frameworks folder:
Step 5: Now Go To this link and generate some QR codes.
(to generate QR codes only add the text which you want to attach with QR code at the end of the link (e.g. I have written archana) and press enter, and right click to save this image.)
Step 6: Add these generated QR code's image in iphone library.
Step 7: Now open QRscannerViewController.h in your xcode and write this code:
Step 8: Now open QRscannerViewController.m in your xcode and write this code:
Step 9: Now open QRscannerViewController.xib and design it UI like this:
Step 10: Now make connection of above 2 objects(UITextView and UIButton) with IBOutlet resultTextView and IBAction StartScan.(Refer Step 7 of…)
At last build and run this app.
How to run this app:
Press "START SCAN" button, and as we are running our app in simulator you will get screen like this:
Now press and hold (alt key)+(left click), Photo Album (image gallery, photo library) will open.
Select any QR code image. It will take hardly 2-3 seconds for scanning and finally you will get home screen with scanned data associated with QR code image on text view.
Download source code from here.
So here I am sharing my experience of implementing a QR code reader in our iPhone app using ZBarSDK.
Step 1: Download ZBarSDK from here.
Step 2: Create a new project in xcode and name it as QRscanner.
Step 3: Integrate this ZBarSDK folder in your xcode project by drag and drop on equal level of class folder in left panel in xcode.
Step 4: Add these 7 frameworks in Frameworks folder:
- AudioToolbox.framework
- CoreMedia.framework
- QuartzCore.framework
- SystemConfiguration.framework
- libiconv.dylib
- AVFoundation.framework
- CoreVideo.framework
Step 5: Now Go To this link and generate some QR codes.
(to generate QR codes only add the text which you want to attach with QR code at the end of the link (e.g. I have written archana) and press enter, and right click to save this image.)
Step 6: Add these generated QR code's image in iphone library.
Step 7: Now open QRscannerViewController.h in your xcode and write this code:
#import <UIKit/UIKit.h>
#import "ZBarSDK.h"
@interface QRscannerViewController : UIViewController <UIImagePickerControllerDelegate,ZBarReaderDelegate>{
IBOutlet UITextView *resultTextView;
}
@property (nonatomic, retain) IBOutlet UITextView *resultTextView;
@property (nonatomic, retain) UIImagePickerController *imgPicker;
-(IBAction)StartScan:(id) sender;
@end
#import "QRscannerViewController.h"
@implementation QRscannerViewController
@synthesize imgPicker,resultTextView;
-(IBAction)StartScan:(id) sender
{
ZBarReaderViewController *reader = [ZBarReaderViewController new];
reader.readerDelegate = self;
reader.readerView.torchMode = 0;
ZBarImageScanner *scanner = reader.scanner;
// TODO: (optional) additional reader configuration here
// EXAMPLE: disable rarely used I2/5 to improve performance
[scanner setSymbology: ZBAR_I25
config: ZBAR_CFG_ENABLE
to: 0];
// present and release the controller
[self presentModalViewController: reader
animated: YES];
[reader release];
resultTextView.hidden=NO;
}
- (void) readerControllerDidFailToRead: (ZBarReaderController*) reader
withRetry: (BOOL) retry{
NSLog(@"the image picker failing to read");
}
- (void) imagePickerController: (UIImagePickerController*) reader didFinishPickingMediaWithInfo: (NSDictionary*) info
{
NSLog(@"the image picker is calling successfully %@",info);
// ADD: get the decode results
id<NSFastEnumeration> results = [info objectForKey: ZBarReaderControllerResults];
ZBarSymbol *symbol = nil;
NSString *hiddenData;
for(symbol in results)
hiddenData=[NSString stringWithString:symbol.data];
NSLog(@"the symbols is the following %@",symbol.data);
// EXAMPLE: just grab the first barcode
// break;
// EXAMPLE: do something useful with the barcode data
//resultText.text = symbol.data;
resultTextView.text=symbol.data;
NSLog(@"BARCODE= %@",symbol.data);
NSUserDefaults *storeData=[NSUserDefaults standardUserDefaults];
[storeData setObject:hiddenData forKey:@"CONSUMERID"];
NSLog(@"SYMBOL : %@",hiddenData);
resultTextView.text=hiddenData;
[reader dismissModalViewControllerAnimated: NO];
}
Step 9: Now open QRscannerViewController.xib and design it UI like this:
Step 10: Now make connection of above 2 objects(UITextView and UIButton) with IBOutlet resultTextView and IBAction StartScan.(Refer Step 7 of…)
At last build and run this app.
How to run this app:
Press "START SCAN" button, and as we are running our app in simulator you will get screen like this:
Now press and hold (alt key)+(left click), Photo Album (image gallery, photo library) will open.
Select any QR code image. It will take hardly 2-3 seconds for scanning and finally you will get home screen with scanned data associated with QR code image on text view.
Download source code from here.
Great stuff, seriously helped me out. But does this actually use the camera outside of the simulator or is this only for a demo with a picker?
ReplyDelete@DrLove: Thanks!!! This will also use camera when you will install this app on device, once test on device, all things will be clear.
ReplyDeleteThis is awesome!
ReplyDeleteThank you for sharing. It's really helpful :)
@Phyllis: Thank you !!! I like to share my experiences :)
ReplyDeleteexcuse me, an 'information.
ReplyDeleteI have been following the tutorial and the application works, just that I have a problem.
After the scan the QR code as output I get the link contained within, for example, whether stored in the QR Code is a link to a video, I don't play the video, but the link returns.
What should I do to play the video, or an image or an mp3?
PS: Sorry for my bad English
@Andrea: If you want to play the video associated with link then just right the code for playing a video in this delegate method - (void) imagePickerController: (UIImagePickerController*) reader didFinishPickingMediaWithInfo: and give the path for video file that link which you have got after scanning.
ReplyDeleteIf any confusion feel free to write here.
Hi, I have a problem integrating the ZBarSDk into my project. The build failed and these 2 errors were returned:
ReplyDelete"_OBJC_CLASS_$_ZBarReaderViewController", referenced from:
objc-class-ref-to-ZBarReaderViewController in QRscannerViewController.o
"_ZBarReaderControllerResults", referenced from:
_ZBarReaderControllerResults$non_lazy_ptr in QRscannerViewController.o
I have already followed the steps by importing "ZBarSDK.h" in the .h file. Please help! Thank you!
I've solved the issue. Thanks for your guide by the way! :)
ReplyDeleteAs mentioned here: http://zbar.sourceforge.net/iphone/sdkdoc/tutorial.html, the frameworks need to be included in the specified sequence.
The package from eSnips (as stated above) also does not include libzbar.a
libzbar.a can be obtained from the original ZBarSDK here: http://zbar.sourceforge.net/iphone
Hi,
ReplyDeleteIm having a slight problem... when i select the image from my gallery, it shows me the image in the app simulator with a window with a "Cancel" and "info" button on the toolbar docked at the bottom.
Now nothing happens. The image doesn't scan, no results are displayed, nothing. Is there supposed to be a button to press to deploy the image or something that I'm missing ???
As of now I just hit cancel after like 5 mins and then go back to the previous screen
@sasha172: If I got your point then for that you have to Press (Alt button + left mouse click) and hold it. It will navigate you to photo gallery of simulator. Is it your solution ?
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHi,
ReplyDeleteIt chose image from the photo gallery, but it not take the out put of the respected qr code
@gogoi : what ever you want to do after taking the image, do write that in this method - (void) imagePickerController: (UIImagePickerController*) reader didFinishPickingMediaWithInfo: (NSDictionary*) info
ReplyDeleteHi
ReplyDeleteFor reading a QR Code Stored in Phone Library, what all lines we have to modify in below link.
It is taking the image from Photo library but no such output is coming
- (void) imagePickerController: (UIImagePickerController*) reader didFinishPickingMediaWithInfo: (NSDictionary*) info
{
NSLog(@"the image picker is calling successfully %@",info);
// ADD: get the decode results
id results = [info objectForKey: ZBarReaderControllerResults];
ZBarSymbol *symbol = nil;
NSString *hiddenData;
for(symbol in results)
hiddenData=[NSString stringWithString:symbol.data];
NSLog(@"the symbols is the following %@",symbol.data);
// EXAMPLE: just grab the first barcode
// break;
// EXAMPLE: do something useful with the barcode data
//resultText.text = symbol.data;
resultTextView.text=symbol.data;
@swati: Here i have written my own code for printing the hidden data in QR code on consol. But you can write your code for what do you want after scanning.
ReplyDeleteHi
ReplyDeleteI wanted the hidden QRCode data flash in a text field of an iPhone.Is it possible with the code mentioned above.
we can't download the source code.
please do tell send me another link.
@swati: yes it is possible by above code. Run app and see on consol.
ReplyDelete@swati: The code is downloadable. Just now I have downloaded it.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete@swati: Check your mail. I have sent it.
ReplyDeleteHi Archana,
ReplyDeleteThanks a lot for your co-operation and patience to reply.
Yes i got mail.
One more thing want to clear
Will this application work for ipad application also.
I tried with ipad application and nothing is displaying.
Can you please put some light on this issue.
HI archana......
ReplyDeleteCan u plz send source code to dis mail id pavuluri.anu81@gmail.com
Hi,
ReplyDeleteI have same doubt as swati, please let me know whether it is possible or not .
i am also trying same with ipad simulator.
Thanks in advance
@anusha: source code is already attached in this post "Download source code from here" written in this post.
ReplyDeleteHi,
ReplyDeleteThanks for this great post! Do you know how to remove the info button? We could use the showControls = No but this would hide the cancel button. It looks like we could add our custom button via the overlay function, but I'm not sure how to do that. Any help would be appreciated.
Thanks
Martin
@Mart Coul: Thanks !!! I can help you if you will be more descriptive like What info button you are talking about ? Please describe your problem here.
ReplyDelete@Archana - Thanks for the feedback. When you are in scanning mode, at the bottom there is a toolbar with a cancel button on the left and an info button on the right. I'd like that specific button to be removed. Would you have an idea on the best approach to do that? I would not want to lose the cancel button which is what happens if I put "showControls = No".
ReplyDeleteThanks a lot!
This comment has been removed by the author.
ReplyDelete@Mart Coul: Ok, I got your issue. Actually those are ZBar Controls, So in your code where you are creating the object of ZBarReaderViewController, set the property showsZBarControls as FALSE.
DeleteFor example in my code:
ZBarReaderViewController *reader = [ZBarReaderViewController new];
reader.showsZBarControls = FALSE;
By writing this both buttons (cancel and info) will be remove and there you can draw your own custom button. Because we can't modify the ZBar SDK files.
Thanks Archana! Yes putting the showsZBarControls = FALSE does work to remove both buttons. But I'm unsure how to add a custom button on that scanning screen. I do add buttons in my others screen and I know how, but I'm not sure how to do it for this one since the ZBar SDK manage that screen. Do you have a sample code for this for me to look at? I've looked on google and could not find an example.
DeleteThanks!
@Mart Coul: For adding custom button on scanning screen, create a button in normal way and then where you are writing reader.showsZBarControls = FALSE;
ReplyDeletewrite this also: reader.cameraOverlayView = (UIView *)myCustomButton;
Thanks a lot Archana! It is working very well!!!! Have a good week end!
DeleteMartin
@Mart Coul: Always WelCome !!!
DeleteArchana Chaurasia, I did the same that Mart Coul, but it dosn't work for me, can you please show an example of it? Thank you very much
DeleteI am having a problem with this implementation. I followed the directions step by step but I am getting the following error:
ReplyDeleteclang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
I have tried searching everywhere that I can find. Does anyone have any idea what the problem could be. I am running XCode 4.4 DP2 and iOS 5.1 trying to run with the simulator and my iPhone 4S. I cannot even get the app to compile
@Archana, thank you so much for sharing this. It works great.
ReplyDeleteI have the same problem as @Mart Coul described, but I can't get it to work. The default buttons are removed, but I can not add my own. Any help would be much appreciated
I've done this:
//remove the default ZBar controls as we will implement our own
reader.showsZBarControls = NO;
//implement our own cancel button
UIButton* backButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[backButton setTag:301];
[backButton addTarget:self action:@selector(scannerButtonTapped:) forControlEvents:UIControlEventTouchUpInside];
reader.cameraOverlayView = (UIView *)backButton;
Cheers,
Vedran
Hey man! Great code, really helpful!
ReplyDeleteWill this work with opening up URL links?
Thanks,
@Archana
ReplyDeleteI have figured out the implementation to URLs. This app and source code works great. However, I am having trouble implementing this to the iPad. Would you happen to know how to deal with this?
Thanks
@Shamsuddin Bhuiyan: Thanks ! and I have also implement it in ipad, and it worked fine. If you have any trouble you share it here and we can figure out it.
ReplyDelete@Archana : I tried implementing this in my universal iOS application and everything went ok until I tried to scan a Page using iPad 3 Camera. The view seems to take only 1/4 of the entire screen of the iPad.
DeleteI tried a lot to sort it myself, but failed. Could you please explain how you obtained the same in iPad.
@Archana
ReplyDeleteI am now a follower of your site. Its a great source for someone who is just learning how to do iOS development.
Anyways, whenever I attempt to run it on the iPad simulator, I get this error output:
2012-05-09 17:16:55.046 QRscanner[1176:10703] UIStatusBarStyleBlackTranslucent is not available on this device.
2012-05-09 17:16:55.049 QRscanner[1176:10703] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'On iPad, UIImagePickerController must be presented via UIPopoverController'
I cannot, for the life of me, figure out what is amiss.
@Archana
ReplyDeleteLooks like it actually works fine in an actual iPad but not on the simulator. Just ran and tested it. Works great. If I wanted to change the dimensions of the scanner, what would I do?
@Archana
ReplyDeleteWill you please guide on bar code scanner in same way..
thank you very much
works fine with qr code that you have given with source code. But doesn't work for other qr codes. It doesn't focus properly.
ReplyDelete@Ajit Satarkar: It also scans bar code.
ReplyDeleteHi , I want to know how to add images to the album ?
ReplyDeleteI tried this path to put the image "/Users/user/Library/Application Support/iPhone Simulator/5.1/Media/PhotoData/AlbumsMetadata" , but no use.
@范凱傑: Check my this post to add photos in image gallay: http://iphonenativeapp.blogspot.in/2011/07/add-images-to-iphone-photo-gallery.html
ReplyDeleteThanks a lot !! I got it !!
ReplyDeleteHi ,
ReplyDeleteI have a problem again , now I can add image to the photo album ,
and follow your steps to decode , but after I choose my QR-image , the screen just show my QR-image , it does not decode the QR-image .
Oh ! it should choose the image twice , but I don't know why , lol
ReplyDelete@ 范凱傑 If my post was helpful for you then join my blog and also you can left the comment on my this post http://iphonenativeapp.blogspot.in/2011/07/add-images-to-iphone-photo-gallery.html
ReplyDeleteHi Archana,
ReplyDeleteI have a problem. After loading the QR code from the library nothing is shown. Can you please let me know if I am doing something wrong. And also the QR code generated is the mirror image. Your help will be appreciated.
Regards,
Lokesh
Hi Archana,
ReplyDeleteI resolved the issue. Actually the QR code generated was not at the center. I created a new QR code and the app is working perfectly. Many thanks for such nice tutorial.
Regards,
Lokesh
could you pls send the QR code generator
Delete@Unknown: Thanks !
ReplyDeleteThanks a lot.. I am following now and hope to learn a lot of things.. Have a great day :)
ReplyDeleteHi, I have a problem with your code. I have 3 errors.
ReplyDeleteUndefined symbols for architecture i386:
"_OBJC_CLASS_$_ZBarReaderViewController", referenced from:
objc-class-ref in ViewController.o
"_ZBarReaderControllerResults", referenced from:
-[ViewController imagePickerController:didFinishPickingMediaWithInfo:] in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
why, i don't understand, I am new
Hi Archana,
ReplyDeleteI am sorry to post a question here as i dont know where to post the same.
I need your help. Can you please let me know how to create a grid view like Google Play in iPhone.
Your help is much appreciated
Regards,
Lokesh
Hi Archana, I am not able to download your code it says link broken. I tried using your steps but my imagePickerController:didFinishPickingMediaWithInfo method is not getting called. Can you mail the code to sonuengineer@gmail.com asap. I am in urgent need. Thanks
ReplyDelete@Sanjay Kumar: From my side its working fine, I am able to dounload, but still I am sending you the code on your ID.
ReplyDeleteArchana, first off, a BIG thank you for helping us out. You are such a good teacher!
ReplyDeleteI'd greatly appreciate it if you can help me with my problem, although the others above had the same problem, it is not working for me.
I tried adding a button on my scanning screen, the cameraOverlay screen, but the button shows up on my main screen, the view controller. I have absolutely no idea how to put a button on the camera scanning screen even though I can do it on anything with a .h or .m file. Where do we even implement code for camera scanning screen?
here's my problem.
I implemented this in my viewcontroller.h file:
__________________________________________________
@interface SecondViewController : UIViewController
< ZBarReaderDelegate >
{
UIButton *btnButton;
}
____________________________________________
Then I implemented this for an overlay(in case u need to c):
__________________________________________________
- (UIView*)CommomOverlay {
UIView* view = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,480)];
UIImageView *FrameImg = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,480)];
[FrameImg setImage:[UIImage imageNamed:@"newGraphicOverlay.png"]];
[view addSubview:FrameImg];
return view;
}
_______________________________________________
Then I put this in my viewcontroller.m file as
-(IBAction) scanButtonTapped {
// ADD: present a barcode reader that scans from the camera feed
ZBarReaderViewController *reader = [ZBarReaderViewController new];
reader.readerDelegate = self;
reader.supportedOrientationsMask = ZBarOrientationMask(UIInterfaceOrientationPortrait);
ZBarImageScanner *scanner = reader.scanner;
reader.showsZBarControls = YES;
reader.cameraOverlayView = (UIView *)btnButton;
UIButton *btnButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btnButton addTarget:self action:@selector(btnButtonTapped:)forControlEvents:UIControlEventTouchDown];
[btnButton setTitle:@"Show View" forState:UIControlStateNormal];
btnButton.frame = CGRectMake(80.0, 210.0, 160.0, 40.0);
[self CommomOverlay];
[self.view addSubview:btnButton];
[scanner setSymbology: ZBAR_UPCE
config: ZBAR_CFG_ENABLE
to: 1];
[self presentModalViewController: reader
animated: YES];
reader.cameraOverlayView = [self CommomOverlay];
[reader release];
}
___________________________________________________
As you can see I made the button in the scanButtonTapped because only after the scan button is tapped the second view appears, which is the scanning screen/ overlay screen.
But the button shows up only on the first screen( the screen controlled by the viewcontroller.m and viewcontroller.h).
I don't want the button on the screen which has the scan button though. How do I make sure the button goes on the scanning screen?
Please help as soon as you can, for I'd be greatly indebted to you! I'd also appreciate it if you can provide detailed instructions. Thanks so much in advance!
Hi Archana,really g8 work .I love this blog and there is lot of material to learn.Gud job!!!!!!
ReplyDelete@Unknown : Thanks a lot, I am trying to make it more lovable :)
ReplyDeleteHi,
ReplyDeleteMy image picker controller function is not being called. Can you please tell me why?
This comment has been removed by the author.
ReplyDeletei m running this code on simulator , i'm select the image from the photo library , but after that
ReplyDelete- (void) imagePickerController: (UIImagePickerController*) reader didFinishPickingMediaWithInfo: (NSDictionary*) info , method is not called ...
One question... how do is create QR code????
ReplyDelete@Danny Alexander Alva Rojas : Follow the step 5. Actually there are many way to create QR codes, one of then I mentioned in Step 5.
DeleteIts as if you read my thoughts about iPad Developer You appear to understand a great deal relating to this, as if you authored it inside it or something like that. I believe you could use a couple of photos they are driving the content home a little, but apart from that, this really is great blog. An excellent read. I'll certainly return.
ReplyDeletehey archana , can u tell me how to create this application for a compnay qr code reader ...
ReplyDeletesend me details on lgaksh@yahoo.com
thanks 4 urs support
@aakash: This will work for scanning any type of QR codes. So no need to create a different application for a company QR code.
DeleteCan we fetch image from library instead of camera, so that we can test it on simulator.
ReplyDeletePlease guide me, if it is possible. Thanks in advance.
Please reply to randeep.stpl@gmail.com and also tell me the way to download this code.
ReplyDeleteThanks.
@Randeep Singh : Yes you can pick the image from library by setting the source of image picker as we will set : UIImagePickerControllerSourceTypePhotoLibrary OR UIImagePickerControllerSourceTypeSavedPhotosAlbum.
DeleteAs mention below:
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary
imagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum
Archana mam please tell how can i do this.
DeleteThank u mam, but i wanted to ask whereto change it.
ReplyDelete-(IBAction)scan
{
imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.delegate = self;
imagePickerController.allowsEditing = YES;
imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:imagePickerController animated:YES];
[imagePickerController release];
// [alert dismissWithClickedButtonIndex:0 animated:YES];
NSLog(@"Gallery");
}
-(void)imagePickerController:(UIImagePickerController *)reader didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[self scanCode];
image1 = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
imageView.image=image1;
[self dismissModalViewControllerAnimated:YES];
NSLog(@"the image picker is calling successfully %@",info);
// ADD: get the decode results
id results = [info objectForKey: ZBarReaderControllerResults];
NSLog(@" results:%@", results);
ZBarSymbol *symbol = nil;
NSString *hiddenData;
for(symbol in results)
hiddenData=[NSString stringWithString:symbol.data];
NSLog(@"the symbols is the following %@",symbol.data);
// EXAMPLE: just grab the first barcode
// break;
// EXAMPLE: do something useful with the barcode data
//resultText.text = symbol.data;
//resultTextView.text=symbol.data;
NSLog(@"BARCODE= %@",symbol.data);
NSUserDefaults *storeData=[NSUserDefaults standardUserDefaults];
[storeData setObject:hiddenData forKey:@"CONSUMERID"];
NSLog(@"SYMBOL : %@",hiddenData);
result.text=hiddenData;
[reader dismissModalViewControllerAnimated: NO];
}
I did this way, but the results(id) shows null.
Please tell where i am getting wrong.
Then you have to check the image which you are scanning. I that image is a correct QR code or just a normal image.
Delete[self scanCode]; what is this method contain can you send the code
Delete@Archana: Hii.. if, you can please send me the code to my mail id:(rswalia1985@gmail.com), it is not downloading here. And please tell me that where i need to put that code(fetch image from library) in your code or the Zbar sdk. Please guide me if you can and i am thankful to you for your till cooperation.
ReplyDeletePlease check your mail.
DeleteI am having problem similar to some others. I am using 4.5 and can get the events to occur as predicted. I create QR Codes, save them to Photo Library, Load them in, but nothing occurs after that. The program simply stalls. And....the images are being scaled larger that the viewport. I even size them down to below 500x500 but inside the QRScanner, they appear scaled up 2-3 times that. HELP!
ReplyDeleteI'm having a problem with the Delegate not being called once the reader gets focus. Could you send the source code to me? I'm unable to download it from the linked page.
ReplyDeletelemmings@gmail.com
Thanks!
Hi Archana,
ReplyDeleteI need help in creating a excel file from sql data. Can I get some help from you if you have any knowledge about this.
Regards,
Lokesh
The content is good and very informative and I personally thank you for sharing the iphone and qr code articles.
ReplyDeleteBarcode Networking
I have followed every word in the tutorial above, the only line of code i remove is [reader release]; as it was generating error in my iOS 6 simulator. Now, the problem is the app works until when it loads the image, then it doesnt display the results of the QR code. Any help? Much appreciated
ReplyDeleteThanks for sharing your knowledge Archana!
ReplyDeleteIf I run the program in iPhone Simulator, it runs perfectly fine. But when I try to run it on Ipod 4g, I get the following error:
Apple Mach-O Linker Error
Ld /Users/ .... /ZBarSDKImplementation-gwadphibgtfgvmabhleptfjbxqwc/Build/Intermediates/ZBarSDKImplementation.build/Debug-iphoneos/ZBarSDKImplementation.build/Objects-normal/armv7s/ZBarSDKImplementation normal armv7s
cd "/Users/.../ZBarSDKImplementation"
setenv IPHONEOS_DEPLOYMENT_TARGET 5.1
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/..../Xcode/DerivedData/ZBarSDKImplementation-gwadphibgtfgvmabhleptfjbxqwc/Build/Products/Debug-iphoneos "-L/Users/..../ZBarSDKImplementation/ZBarSDKImplementation/ZBarSDK" -F/Users/... /Xcode/DerivedData/ZBarSDKImplementation-gwadphibgtfgvmabhleptfjbxqwc/Build/Products/Debug-iphoneos -filelist /Users/..../Xcode/DerivedData/ZBarSDKImplementation-gwadphibgtfgvmabhleptfjbxqwc/Build/Intermediates/ZBarSDKImplementation.build/Debug-iphoneos/ZBarSDKImplementation.build/Objects-normal/armv7s/ZBarSDKImplementation.LinkFileList -dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=5.1 -liconv -framework QuartzCore -framework CoreVideo -framework CoreMedia -framework AVFoundation -framework UIKit -framework Foundation -framework CoreGraphics -lzbar -o /Users/.../Developer/Xcode/DerivedData/ZBarSDKImplementation-gwadphibgtfgvmabhleptfjbxqwc/Build/Intermediates/ZBarSDKImplementation.build/Debug-iphoneos/ZBarSDKImplementation.build/Objects-normal/armv7s/ZBarSDKImplementation
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/.../ZBarSDKImplementation/ZBarSDKImplementation/ZBarSDK/libzbar.a for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
FYI...I am using ZBarSDK 1.2 and I am following to the documentation on: http://zbar.sourceforge.net/iphone/sdkdoc/ in order to make a working app to scan QR codes. I am using Xcode 4.5 to write the code.
Despite the fact that I go though the steps religiously, I run into the above mentioned error.
Also, I am not able to download your source code. Can you please check the link?
Thanks!
Dear Archana Chaurasia, thanks for sharing your knowledge and your blog.
ReplyDeleteI am facing some problem after integrating ZBarframework for scanning QRCodeRead on my apps. My client wants, QRCode Scanner will be in a fixed frame and must not be a PresentModalView. Then I write code for fixed frame QRCode Scanner and adding reader.view on self.view, but it not working as presentModalViewController:reader. I don't know what is my fault and can't solve this problem. I provide my code bellow and Sorry for my bad English.
*After integrating this code working fine.
- (IBAction) scanButtonTapped
{
ZBarReaderViewController *reader = [ZBarReaderViewController new];
reader.readerDelegate = self;
reader.supportedOrientationsMask = ZBarOrientationMaskAll;
ZBarImageScanner *scanner = reader.scanner;
[scanner setSymbology:ZBAR_I25 config:ZBAR_CFG_ENABLE to:0];
[self presentModalViewController:reader animated:YES];
[reader release];
* But this code not working, just showing a green box which focus QRCode but doing nothing.
- (IBAction) scanButtonTapped
{
ZBarReaderViewController *reader = [ZBarReaderViewController new];
reader.readerDelegate = self;
reader.supportedOrientationsMask = ZBarOrientationMaskAll;
reader.showsCameraControls = NO;
reader.showsZBarControls = NO;
[reader setWantsFullScreenLayout:NO];
reader.showsHelpOnFail = NO;
reader.showsZBarControls = NO;
[reader.view setFrame:CGRectMake(20, 134, 280, 202)];
ZBarImageScanner *scanner = reader.scanner;
[scanner setSymbology:ZBAR_I25 config:ZBAR_CFG_ENABLE to:0];
[self.view addSubview:reader.view];
[reader release];
}
Please help me and give me a solve to get out from here...thanks at advance...
Have a good day!
hello Archana..... its not working for other qrcode..... and also not working for second time of same qrcode.... can u plz help me yaar.....
ReplyDeletehello archana.... not working for other qrcode..... and not working for second time for u given qrcode... can u help me plz....
ReplyDeletehow can i download demo.
ReplyDeletePlease send code to this mail sk.ijaz@gmai.com
ReplyDeleteThis does not seem to work in simulator .. ? I havent tested this on the device .But doesnt seem to work on the simulator.
ReplyDeleteHi,
ReplyDeleteI m using zbarsdk to scann barcode, its working good,but after alert of upc code how to use it in app to proceed further
thanks
nice tutorial .
ReplyDeleteThanks
Thank you a lot!! Archana.. for your time.
ReplyDeleteI used Zxing lib for scanning QR code, was looking for ZBar, I found your tutorial is straightforward, going to give it a shot this morning!! and let you know.
I do share my knowledge as well, you may like to have look at here "http://www.rdcworld-iphone.blogspot.in"
Please! keep sharing this. be social :)
Regards,
RDC
I found one issue, not very important, but maybe could be easily fixed. When I check the option to automatically reconnect, and phone BT is turned off, or phone is taken away from the tablet and there is no connection, tablet power consumption is quite high
ReplyDeletei phones
Hi Archana,
ReplyDeleteThe example given is simple and straightforward.I tried with the steps but i Guess my didFinishPickingMediaWithInfo is not get called,Can you please mail the source code as am unable to download from the Link provided
could you please send the working code to mail id datchayan.sp@gamil.com.
ReplyDeleteHi arachana , could you please explain how to scan the QR code in device
ReplyDeletePlease send demo to this mail anovoselskiy@alteso.com
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHi,
ReplyDeleteI am using z bar SDK for iphone to scan QR code ,by default scanning camera is back camera but I want scan QR code from rear camera so how can enable rear camera of iphone using Zbar SDK version 1.2.
Archu you rock !!! great work....
ReplyDeletehi archana,
ReplyDeleteeverything is fine but i selected the image from library. App is not working.
And also i got this error "linker command failed with exit code 1 (use -v to see invocation)" when i tried to install application in device.Please send me the code to my mail (naveen.medeti@gmail.com)
was very useful. great work
ReplyDeletebuy cheap smartphones project by drag and drop on equal level of class folder in left panel in xcode.
ReplyDeletehi this is my code
ReplyDeleteid results =
[info objectForKey: ZBarReaderControllerResults];
DLog(@"4");
ZBarSymbol *symbol = nil;
for(symbol in results)
{
isAnyBarcodeScanned=YES;
overlay.btnCode.enabled=TRUE;
if ([symbol.data isEqualToString:@""])
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Failure" message:[FSM_COMMON_SETTINGS returnMessageForCode:89162] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
[alert show];
return;
}
in above code i sometimes get symbol.data as @"". Do you know why it must be happening?
Nice post. So helpful idea. Thanks for sharing. en ucuz iphone 5
ReplyDeleteHi,
ReplyDeleteIt chose image from the photo gallery, but it not take the out put of the respected qr code
hi archana,
ReplyDeleteeverything is fine but i selected the image from library. App is not working.
And also i got this error "linker command failed with exit code 1 (use -v to see invocation)" when i tried to install application in device.Please send me the code to my mail (saritbahuguna74@gmail.com)
please mam help me....
In case your QR code images zoom in, here's a code snippet you can add inside (IBAction) scanButtonTapped:
ReplyDeletereader.readerView.zoom = 1.0;
Got it from another article about creating a barcode scanner, here's the link:
http://wallmobile.wordpress.com/2013/06/19/how-to-add-zbar-sdk-in-xcode-for-qrcode-scanner-barcode-scanner/
Archana, thanks a lot for this tutorial, it is indeed very helpful. I was able to test the ZBar SDK on XCode. I need to use a mouse for the alt + left click buttons for getting an image from the Photo Library. Your tutorial in adding an image to the Photo Library is also very helpful.
Keep up your tutorials.
I Can't download the project from the link
ReplyDeleteWill u please send the project to teddythms@gmail.com
Hi there,
ReplyDeleteI can not download the SDK either. Can you please advice?
Johan
We have huge information about iPhone & iPad Apps. Do you wanna develop your mobile Apps? come check out our website, http://www.taoteapps.com, we have a lot information to help making your mobile deployment a success.
ReplyDeleteThe interest for iphone and other cell phone provision improvement administrations proceeds to develop. As clients encounter the different profits of utilizing versatile applications, they will start to depend on these applications for an assembly of things like for getting data about their most loved motion pictures, entering markdown coupons from grocery store stores, downloading music and for playing recreations.
ReplyDeleteiPhone App Builder // Mobile Application Development // iPhone Application Development
It is really a nice information and it helps me a lot. Thanks for sharing
ReplyDeletenode js development companies
angularjs development services in bangalore
I Got some good idea by reading this topic. Great information thanks for sharing such a nice blog with us.
ReplyDeleteapp development companies in Indianapolis
iphone apps development companies Indianapolis
Blockchain Development Company in Indianapolis
iot companies Indianapolis
Hi,
ReplyDeleteIt chose image from the photo gallery, but it not take the out put of the respected qr code
Amartam is exuberant to announce its new plan to help its clients in India by offering custom based WordPress design solutions.
ReplyDeleteVisit Here:
Wordpress Website Development Company
Wordpress Development Company
Hire Wordpress Developers
This comment has been removed by the author.
ReplyDeleteVery good way, thank you for sharing this scan barcode from pdf method.
ReplyDeleteExcellent information, I like your post.
ReplyDeleteBest Android Application Development Company in kolkata
Best Software Development Company in Kolkata
App Development Company in kolkata
The content shared is really informative. I’ll definitely recommend my friends to go through your site and blog at least once.
ReplyDeleteAI Company in san francisco
best mobile app development companies california
React native apps development companies california
I am having such a good time on this wonderful post and i think it is good to have this post here. Thanks for share this wonderful post here.
ReplyDeleteI am having such a good time on this wonderful post and i think it is good to have this post here. Thanks for share this wonderful post here.
eact native app development companies San Francisco
Blockchain application development in san francisco
AI Company in san francisco
best mobile app development companies california
React native apps development companies california
iPhone development is one of the most complicating tasks.
ReplyDeleteWeb Development Company in Bangalore
Great post,thank you the informative blog.
ReplyDeleteMobile app development companies in singapore
Thanks for share this wonderful post here.
ReplyDeleteMobile app development companies in Kurla lumpur
Another interesting articles .am amazed i am reading the articles one by one since yesterday night and every time i find a new article grabbing my attention within a post.
ReplyDeleteTop Mobile App Development Companies in Dubai
Thank you for sharing this.
ReplyDeleteapp development company in Dubai
app development company in Dubai
app development company in Saudi Arabia
app development company in Kuwait
awesome post presented by you..your writing style is fabulous and keep update with your blogs.
ReplyDeleteai app development technology blog
artificial intelligence application blogs
Mobile application world
Top mobile apps trends
Top mobile app development company
Hello guys,
ReplyDeleteI Read your blog and I found it is very good. There is a lot of good information on this blog, I'd like to Share and I think people will get a lot of support from this blog. Thanks for sharing this informative blog, please keep up and share some unique posts with us in the future.
Digital Marketing Company in Jaipur
Digital Marketing agency In Jaipur
seo company In Jaipur
be safe
Nice article for getting good knowledge, hope people are liking it for their personal as well as professional welfare. Writing about a topic isn't easy, It took dedication and skills to write something good anout anything. In the meantime, do check out our website for enhancing your digital marketing skills and business productivity.
ReplyDeletedigital marketing company in Jaipur
PPC company in Jaipur
social media marketing company in Jaipur
content writers in Jaipur
website development company in Jaipur
This comment has been removed by the author.
ReplyDeleteHii, great content for acquiring new information regarding new things. I always keep an eye on this page for new updates. Please visit https://digiroads.in for more exciting news and digital marketing services
ReplyDeletedigital marketing company in Jaipur
PPC company in Jaipur
seo company in Jaipur
social media marketing company in Jaipur
content writers in Jaipur
website development company in Jaipur
Hii,
ReplyDeleteWhile browsing internet, I came across this beautiful article. This article is great for enhancing your knowledge regarding new things. I always support such bloggers who are investing their valuable time in assisting us with daily technologies and trends.
digital marketing company in Jaipur
Digital marketing company in Delhi
Digital marketing company in Bangalore
Digital marketing company in USA
PPC company in Jaipur
seo company in Jaipur
social media marketing company in Jaipur
content writers in Jaipur
website development company in Jaipur
mobile app development companies in Bangalore
digital marketing company in Jaipur
ReplyDeleteLooking to enhance your digital marketing efforts?
ReplyDeleteWell, we got you.
We at Digiroads are available 24*7 for serving all your digital needs. We are the best digital marketing company in Jaipur in terms of customer satisfaction and services. Please visit our website https://digiroads.in for more information. You can also drop an email at info@digiroads.in for any queries.
digital marketing company in Jaipur
Digital marketing company in Delhi
Digital marketing company in Bangalore
Digital marketing company in USA
PPC company in Jaipur
seo company in Jaipur
social media marketing company in Jaipur
content writers in Jaipur
website development company in Jaipur
mobile app development companies in Bangalore
Hi, I Read your blog and I feel it is a very wonderful, informative blog . There are a lot of good information on this blog, I'd like to Share and I think people will get a lot of support from this blog. Thank you for sharing this informative blog, please keep up and share some unique posts with us in the future
ReplyDeleteecommerce website development services
Mobile App Development Company in bangalore
SEO company services
Web Design Company
Digital Marketing Agency
Packers and Movers
Service Apartments in Bangalore
Hey,
ReplyDeletei reached this page while looking for something and glad to find this masterpiece here. This article is well written and concise to the point. Such articles are very fruitful for gaining new knowledge.
digital marketing company in Jaipur
Digital marketing company in Delhi
Digital marketing company in Bangalore
Digital marketing company in USA
PPC company in Jaipur
seo company in Jaipur
social media marketing company in Jaipur
content writers in Jaipur
website development company in Jaipur
mobile app development companies in Bangalore
Hi ,I read your blog and Blog is very insightful about Personal and Social Related Website Design, keep up the work and be sharing such unique posts.. There is a lot of good stuff, I would like to share and I hope people would have a lot of support from this blog. Thank you for sharing this blog that is insightful.
ReplyDeletee learning & LMS app development company in India
e learning & LMS app development company in UK
e learning & LMS app development company in USA
e learning & LMS app development company in Dubai, UAE
e learning & LMS app development company in Kolkata
e learning & LMS app development company in Chennai
e learning & LMS app development company in Hyderabad
e learning & LMS app development company in New Delhi
e learning education & LMS app development company in Mumbai
Hello, I read your blog and find it to be very informative about Personal and Social Website Design. Please keep up the good work and continue to share more unique posts. I have a lot of good stuff I'd like to share, and I'm hoping that this blog will provide a lot of help to people. Thank you for sharing this informative blog.
ReplyDeletee learning & LMS app development company in India
e learning & LMS app development company in UK
e learning & LMS app development company in USA
e learning & LMS app development company in Dubai, UAE
e learning & LMS app development company in Kolkata
e learning & LMS app development company in Chennai
e learning & LMS app development company in Hyderabad
e learning & LMS app development company in New Delhi
e learning education & LMS app development company in Mumbai
RisingMax is a blockchain application development company in New York with a professional and experienced team of developers who provide customers with end-to-end blockchain application development services. The blockchain stores vehicle information in a decentralized distributed database, which is established in various departments to obtain detailed vehicle information. Any report of vehicle details from one office will be reflected in different offices at the same time. Through blockchain-based vehicle registration, we eliminate the participation of multiple third parties, thereby avoiding information leakage, data duplication and the elimination of various problems. One more thing, if you are looking for Progressive Web App Development Company then trust me you can win the game of development industry.
ReplyDeleteIts like you read my mind! You appear to know so much approximately this, like you wrote the e-book in it or something. I believe that you can do with some p.c. to power the message home a bit, but instead of that, this is wonderful blog. A great read. I will definitely be back.
ReplyDeletedigital marketing company in Jaipur
Digital marketing company in Delhi
Digital marketing company in Bangalore
Digital marketing company in USA
SEM company in Jaipur
seo company in Jaipur
social media marketing company in Jaipur
content writers in Jaipur
website development company in Jaipur
Once again you provide several doses of reality which explore the complete explanation of packing and moving companies in Bangalore . This article don't have to be that long. I simply couldn't leave your web site before suggesting that I actually loved the usual info on packing and movers services in Bangalore. I just want to know what is the best way to get real service.
ReplyDeleteGood blog,
ReplyDeleteDigital Marketing Companies in Chennai, Website Design Companies in Chennai, SEO Companies in Chennai, Digital Marketing Company Chennai, Web Design Company Chennai
https://wisewebtek.com
I read your blog and find it to be very informative about Personal and Social Website Design. Please keep up the good work and continue to share more unique posts. I have a lot of good stuff I'd like to share, and I'm hoping that this blog will provide a lot of help to people. Thank you for sharing this informative blog.
ReplyDeleteMobile app development companies in Delhi
Mobile app development companies in Bangalore
Mobile app development in Bangalore
Educational app development
e learning & LMS app development company in UK
e learning & LMS app development company in USA
e learning & LMS app development company in Dubai, UAE
e learning & LMS app development company in Kolkata
e learning & LMS app development company in Chennai
e learning & LMS app development company in Hyderabad
e learning & LMS app development company in New Delhi
e learning education & LMS app development company in Mumbai
e learning education & LMS app development company in saudi arabia
HI guys,
ReplyDeleteThis is a very good post, and I like it very much. For us, it's insightful and helpful. For a long time, I've been looking for this and I'm just really pleased to say that I'm working with this stuff as well. Thanks for sharing this with us.
Digital Marketing Company in Jaipur
Digital Marketing company In Delhi
Digital Marketing Company in Bangalore
SEO Company in Jaipur
Website development Company in Jaipur
PPC Company in Jaipur
Digital Marketing Company in USA
HI,
ReplyDeleteI read your blog and I find that it is very informative about the personal and social design of the website. Please continue with good work and continue to share more unique publications. I have many good things that I would like to share, and I hope this blog gives you a lot of help for people. Thank you for sharing this informative blog.
Mobile app development companies in Delhi
Mobile app development companies in Bangalore
Mobile app development in Bangalore
Educational app development
e learning & LMS app development company in UK
e learning & LMS app development company in USA
e learning & LMS app development company in Dubai, UAE
e learning & LMS app development company in Kolkata
e learning & LMS app development company in Chennai
e learning & LMS app development company in Hyderabad
e learning & LMS app development company in New Delhi
e learning education & LMS app development company in Mumbai
e learning education & LMS app development company in saudi arabia
Fantastic post however , I was wondering if you could write a little more on this topic? I’d be very thankful if you could elaborate a little bit further, Many thanks!
ReplyDeleteread more
read more
read more
read more
read more
Custom software development company in London provides with the best services in IT with offshore and bespoke software developers.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteIf you are looking for the best website to watch movies for free online, you can check out afdah to website and stream without any membership.
ReplyDeleteYou can visit our website myflixer movies and watch online free movies and Tv shows for free without any membership. Myflixer movies is the #1 choice to stream your favorite movies for free online.
ReplyDeleteThank you for sharing the best information this blog is more helpful for me.
ReplyDeleteWeb Development Companies In NY
Shopify Development App
Shopify Support
Shopify Development
Wordpress Plugin Development
It is really a great and helpful piece of information. I am glad that you shared this useful info with us. Please keep us informed like this. 룰렛
ReplyDeleteThe new kid on the block is flixtor movies. It's one of the few websites like 123movies that don't have any adverts or pop-ups. If you have a look around this website, you'll find a big collection of TV shows and movies that you can watch for free online without having to register.
ReplyDeleteThank you for sharing this information. I read your blog and I can't stop my self to read your full blog. 토토
ReplyDeleteWe all know that laptop has very importance in our daily life because our mostly works are based on the laptop. At any age you are, you still need a good and best performance base laptop for your daily work and extra activities you want to do. If you asked me that which laptop complements the demand of every basic task then I recommend you to check Toshiba Satellite c55-c5390 review
ReplyDeleteThis is a great inspiring article. I am pretty much pleased with your good work. You put really very helpful information. Keep it up. You might also like coin stars near me
ReplyDeleteThank you for providing such a useful and attractive post.
ReplyDeletehttps://textspeed.in/promotional-sms-chennai.html">
bulk sms marketing chennai
bulk sms service chennai
promotional sms chennai
sms marketing chennai
sms service provider in chennai
bulk whatsapp service provider in chennai
bulk sms marketing in chennai
bulk sms price in chennai
bulk sms provider chennai
bulk sms service provider in chennai
chennai bulk sms
best bulk sms service provider in chennai
bulksms in Chennai
I see the article has a great deal of investment in content and science. I took the time to read them and found them quite interesting. You can check out adidas product tester
ReplyDeletemmorpg
ReplyDeleteinstagram takipçi satın al
tiktok jeton hilesi
TİKTOK JETON HİLESİ
antalya saç ekimi
Takipci
instagram takipçi satın al
metin2 pvp serverler
takipci
smm panel
ReplyDeleteSmm panel
İş ilanları
İnstagram Takipçi Satın Al
HIRDAVATÇI
WWW.BEYAZESYATEKNİKSERVİSİ.COM.TR
SERVİS
tiktok jeton hilesi
Here we provide jobs in Mumbai from Job vacancy result company . And we also provide jobs in different state. Thanks for commenting.
ReplyDeleteJobs in Mumbai
Jobs in Mumbai
Jobs in Mumbai
Jobs in Mumbai
Great Article, Thank you so much.
ReplyDeletecost of e-commerce app development in Mumbai
Your post is very good. I got to learn a lot from your post. Thank you for sharing your article for us. it is amazing post
ReplyDeleteMoj app development cost
SEMs and large enterprises should engage a digital transformation company in order to create a bespoke strategy as part of the business and technological change.
ReplyDeleteThanks for sharing this comment
ReplyDeleteAbogado De Trafico En Virginia
Family Law Attorney Near Me Edison NJ
Good article
ReplyDeleteAbogado De Trafico En Virginia
Family Law Attorney Near Me Edison NJ
Nice Way for Blogging,, and Amazing All Post that shares by you.
ReplyDeleteThanks for creating a beautiful Blogs
Supreme Hoodie offers the latest fashion products. Get high-quality hoodies, shirts, Hats, and Supreme Hoodie sweatshirts. Order Now!
ReplyDeleteI never imagined I’d actually get the hang of this subject, but this article changed that for me. The writer’s clear and thoughtful explanation really made a difference. Kudos for making it so accessible! Visit our link for ISO Certification in Saudi Arabia
ReplyDelete