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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:45:10+00:00 2026-06-05T03:45:10+00:00

This is my Code so far: NSString *listedImageURL = listedProduct.image; NSLog(@URL: %@, listedImageURL); This

  • 0

This is my Code so far:

NSString *listedImageURL = listedProduct.image;

NSLog(@"URL: %@", listedImageURL);

This Code works fine and NSLog shows me the correct URL. But when I try the following Code, NSLog shows up (null):

NSString *listedImageURL = listedProduct.image;

NSURL *imageURL = [NSURL URLWithString:listedImageURL];
NSData *imageData = [NSData dataWithContentsOfURL:imageURL];
UIImage *image = [UIImage imageWithData:imageData];

What am I doing wrong??

  • 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-06-05T03:45:11+00:00Added an answer on June 5, 2026 at 3:45 am

    I believe that relower is on the right track, the documentation states:

    This method expects URLString to contain any necessary percent escape codes, which are ‘:’, ‘/’, ‘%’, ‘#’, ‘;’, and ‘@’. Note that ‘%’ escapes are translated via UTF-8.

    I believe that it would be helpful to identify which characters might be causing an issue for you if you were to post some examples of the URLs that you are converting.

    I would suggest logging: listedImageURL

    and then also running:

    NSString *escapedImageUrl = [listedProduct.image stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    

    then log that.

    That should let you see what is being escaped and what is being missed. It can be something as simple as a stray space.

    You could also try using NSASCIIStringEncoding instead of NSUTF8StringEncoding and see if that makes a difference.

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

Sidebar

Related Questions

Why this code works fine: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString
I have this code so far which perfectly but relies on there being a
As far as I can tell, this code is fine, and should display some
Hey im having this code so far - (id)initWithDictionary:(NSDictionary *)aDictionary { self = [super
This is my code so far: var n = 123456789; var d = n.toString().length;
SO this is my code so far: JS: <script type=text/javascript> function Hide(srcField) { var
This is what I have as far as code, it is in the first
This is as far as I've gotten. What code would I write to save
Update : I edited the code, but the problem persists... Hi everyone, this is
If I have this code, why doesn't the textview's text update? As far as

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.