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

  • SEARCH
  • Home
  • 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 6374691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:31:11+00:00 2026-05-25T01:31:11+00:00

I have a problem with the next code: NSDictionary * imagen = [[NSDictionary alloc]

  • 0

I have a problem with the next code:

NSDictionary * imagen = [[NSDictionary alloc] initWithDictionary:[envio resultValue]];
NSString *imagenS = [imagen valueForKey:@"/Result"];

ClaseMaestra *b1 = [[ClaseMaestra alloc]init];
NSData *imagenDecode = [[NSData alloc] initWithData:[b1 base64DataFromString:imagenS]];

NSLog(@"Decode Image:");
NSLog(@"%@", imagenDecode);

//SAVE IMAGE

NSArray *sysPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);  

NSString *docDirectory = [sysPaths objectAtIndex:0]; 

NSString *filePath = [NSString stringWithFormat:@"%@david.png",docDirectory]; 

[imagenDecode writeToFile:filePath atomically:YES]; 

Blockquote

[envio resultValue] –> return a NSDictionary with one image in Base 64 codification.

I want decoder and save this image but in my console I have showed this message:

2011-08-23 19:19:39.750 WSStub[38501:a0f] *************************
2011-08-23 19:19:39.752 WSStub[38501:a0f] SendImage
2011-08-23 19:19:39.752 WSStub[38501:a0f] *************************
2011-08-23 19:19:39.759 WSStub[38501:a0f] -[ClaseMaestra base64DataFromString:]: unrecognized selector sent to instance 0xd00ad0
Program received signal:  “EXC_BAD_ACCESS”.

ClaseMaestra interface is:

#import <Foundation/Foundation.h>

@class NSString;

@interface ClaseMaestra : NSObject 

+ (NSMutableData *)base64DataFromString: (NSString *)string;

@end

I can´t understand the “unrecognized selector” error…

  • 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-25T01:31:11+00:00Added an answer on May 25, 2026 at 1:31 am

    This is a class method and you call iton an instance of the class. You should either change it to an instance method. instead of:

    + (NSMutableData *)base64DataFromString: (NSString *)string;
    

    Use:

    - (NSMutableData *)base64DataFromString: (NSString *)string;
    

    Or, change the call, instead of:

    NSData *imagenDecode = [[NSData alloc] initWithData:[b1 base64DataFromString:imagenS]];
    

    Use:

    NSData *imagenDecode = [[NSData alloc] initWithData:[ClaseMaestra base64DataFromString:imagenS]];
    

    What to choose depends on your needs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

today i have a simple an understable problem for me . Next code: alphavar
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
We have next code. Sometimes we should wait 10-20-40 seconds on the last line.
I have the next code: document.myForm.mySubmit.click(); Where myForm - form name, mySubmit - submit
I have a next problem. I need to represent a pressed keys combination in
I have problem with this code: For i = 18 To 19 + Cells(1,
I have problem with my code Public Class Form1 Dim lm(4, 4) As Char
I'm currently working on XML (SVG) traversing and have the next problem: my function
I have next code that represents graph edges and nodes (simplified for question): public
Hey guys I have a problem, I have a NSDictionary of NSArrays and im

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.