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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:13:30+00:00 2026-06-06T04:13:30+00:00

I have an app which requires downloading image asynchronously in base64 encoded string(server is

  • 0

I have an app which requires downloading image asynchronously in base64 encoded string(server is returning the image in Base64 encoded format),I am using the AsyncImage view,but it seems that AsyncImageView library only accepts the url to download asynchronously.
Anyone having any idea how to go about this,if i will download all images at once an then i can pass that encoded string to

   [self.imageView loadImageFromURL:[NSURL URLWithString:[EncodedString]]];

but this dosesn’t make sense as all the image will be downloaded still in UIThread.
Please help.
Thanks..!!

  • 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-06T04:13:31+00:00Added an answer on June 6, 2026 at 4:13 am

    You should look into Cocoa Helpers – it has SimpleHTTPLoader for async loading and ImageViewCached which does exactly what you need. You create not imageView, but ImageViewCached and just set URL for it. It does the rest for you.

    But if you want to do it your way:

    I don’t guarantee that the code below is correct, but the whole idea is (i took it from working code and rewrote it to correspond your task. I used cocoa helpers for base64 decoding. You may use your own methods.

    dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul);
    dispatch_async(queue, ^{    
      NSString *query = [NSString stringWithFormat:@"site.example/image.jpg"];
      NSString *data = [[[NSString alloc] initWithContentsOfURL:[NSURL URLWithString:query] encoding:NSUTF8StringEncoding error:nil] autorelease];
      theImage = [UIImage imageWithData:(rfc::from_base64(data))]
        dispatch_sync(dispatch_get_main_queue(), ^{
            self.imageview.image = theImage;}
        });
    });  
    

    P.S. for base64-encoded images you’d have to modify ImageViewCached for it to load and decode images.

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

Sidebar

Related Questions

I have a rails app that requires multi-table inheritance for which I am using
I have been developing an app in VB.NET which requires a control object (for
I have a rails app which requires users to verify that they own a
I have a telephony app which has a prompt which requires user choice. I
I'm building a Flex app which requires me to download files. I have the
We have a PHP app with a dynamic URL scheme which requires characters to
I have a database in a Android app, which requires to upload it's database
I have an iPhone app which requires to be a universal app. Common between
I am developing an iPhone app which requires charts. Hence I am using API
I'm writing a web app using grails and spring-security 3.0.3 which requires me 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.