Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6728905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:13:31+00:00 2026-05-26T10:13:31+00:00

I need to decode an QR image using the zxing library for iOS. I’m

  • 0

I need to decode an QR image using the zxing library for iOS.

I’m new to iOS programming, and have been looking through the code examples included in the project, but I can’t figure out how to just decode an image using this library.

If anyone can please post examples of how I decode an image it would be much appreciated.

So far I’ve identified the Decoder class, which has a method called “decodeImage” which I’ve loaded with an image. But this method returns a boolean, and what I need is a text string containing the value of the QR code.

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:13:32+00:00Added an answer on May 26, 2026 at 10:13 am

    This was the code that finally solved my problem – thanks to the help from smparkes

    HEADER FILE

    #import <UIKit/UIKit.h>
    #import <QuartzCore/QuartzCore.h>
    #import "ApplicationConfiguration.h"
    #import <ZXingWidgetController.h> 
    
    @interface ScanViewController : UIViewController<DecoderDelegate>
    {
        UIButton *scanButton;
    }
    
    @property (nonatomic, retain) IBOutlet UIButton *scanButton;
    @property (nonatomic, retain ) NSSet *readers;
    
    - (IBAction)doScanAction;
    - (void)decoder:(Decoder *)decoder didDecodeImage:(UIImage *)image usingSubset:(UIImage *)subset withResult:(TwoDDecoderResult *)result;
    - (void)decoder:(Decoder *)decoder failedToDecodeImage:(UIImage *)image usingSubset:(UIImage *)subset reason:(NSString *)reason;
    
    @end
    

    IMPLEMENTATION FILE

    #import "ScanViewController.h"
    #import <ZXingWidgetController.h> 
    #import <QRCodeReader.h> 
    #import "TwoDDecoderResult.h"
    
    @implementation ScanViewController
    
    @synthesize scanButton;
    @synthesize readers;
    
    -(IBAction)doScanAction{
        QRCodeReader* qrcodeReader = [[QRCodeReader alloc] init];
        self.readers = [[NSSet alloc ] initWithObjects:qrcodeReader,nil];
        [qrcodeReader release];
    
        Decoder *d = [[Decoder alloc] init];
        [d setDelegate:self];
        [d setReaders:self.readers];
        [readers retain];
    
        BOOL decodeSuccess= [d decodeImage:[UIImage imageNamed:@"QRcode.png"]];
        NSLog(@"BOOL = %@\n", (decodeSuccess ? @"YES" : @"NO"));
    }
    
    - (void)decoder:(Decoder *)decoder didDecodeImage:(UIImage *)image usingSubset:(UIImage *)subset withResult:(TwoDDecoderResult *)result{
        [result retain];
        NSLog(@"Did Decode Image Result: %d",[result text]);
        [result release];
    }
    
    - (void)decoder:(Decoder *)decoder failedToDecodeImage:(UIImage *)image usingSubset:(UIImage *)subset reason:(NSString *)reason;
    {
        [reason retain];
        NSLog(@"Failed Decode Image Result: %d",reason);
        [reason release];
    }
    
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some files that are uuencoded, and I need to decode them, using
In Android, Using ZXing we can scan a QR code through phone camera and
I have been assigned to encode and decode images using the Shannon-Fano technique. I'll
I need to decode a packet sent using TIBCO-RV and pull fields out of
I'm using the below code to transfer an image from one folder on external
I have an image, onclick on which I make some ajax requests. I need
In my application , i need to decode EAN-13 barcode image.The image captured from
I'm using console java tool Zxing to decode qr codes from images. I call
I am using OpenCV static library in Objective-C to do some image processing, and
I'm fairly new to iOS programming and am struggling to decide on what is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.