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 969489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:38:59+00:00 2026-05-16T02:38:59+00:00

NSData *finaldata2 =[NSData dataWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@DefaultProfilePhoto.jpg]]; now when i convert this NSData to

  • 0

NSData *finaldata2 =[NSData dataWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@”DefaultProfilePhoto.jpg”]];

now when i convert this NSData to NSString at that time i’m getting value null.
How to resolve this problem

I need data of my png file into 1 NSString

  • 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-16T02:39:00+00:00Added an answer on May 16, 2026 at 2:39 am

    Every subclass of NSObject has a -description method, including NSData:

    NSString *finaldata2String = [finaldata2 description];
    

    For NSData this will create an NSString representation of the data, making a string of bytes in hexadecimal format.

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

Sidebar

Related Questions

-(IBAction)pushUpload{ NSData *media = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@Movie ofType:@m4v]]; NSString *urlString = @http://api.twitpic.com/api/upload; NSString
NSDATA *data1; NSDATA *data2; NSDATA *data3; I want to convert my this all 3
NSData *myRequest = [NSString stringWithFormat:(@&site=%@&key=%@,tmpSite,tmpKey)]; Why is this not working ? Thanks
Is converting an XML to NSString from NSData, then manipulate string and convert it
I have an NSData that I would like to read as an NSInputStream. This
I wanna have a NSString object as NSData . Later this NSData-Object should return
I'm using: NSData *output1 = [NSData dataWithContentsOfFile:@~/centralUtilOut.tmp]; NSString *output = [[NSString alloc]initWithData:output1 encoding:NSUTF8StringEncoding]; NSLog(@%@,
I need to convert a NSData object to an NSString. It is meant to
I get NSData of bytes that look like this: 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d
i converted MPMediaItem to NSData and stored that in database, now i have to

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.