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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:00:31+00:00 2026-06-11T18:00:31+00:00

I am using the following code NSMutableArray *image=[[NSMutableArray alloc]init]; for(int i=1;i<4;i++) { NSString *urlString

  • 0

I am using the following code

NSMutableArray *image=[[NSMutableArray alloc]init];
    for(int i=1;i<4;i++)
    {
        NSString *urlString =[NSString stringWithFormat:@"http://www.isco.com/webproductimages/appBnr/bnr%d.jpg",i];
        NSData *photoData = [NSData dataWithContentsOfURL:[NSURL URLWithString:urlString]];
       [image addObject:photoData];
    }

my problem is, if the network failure occurs, it shows thread…
How to handle this thread??

  • 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-11T18:00:32+00:00Added an answer on June 11, 2026 at 6:00 pm

    Your “thread” problem (it is a error/exception) could be caused by multiple factor. It could be that the internet connection is down, or the server throw some form of http error.

    To start of, make sure you are not losing any internet connection when running network operations. There are number of advice on how to check for internet connection. One is to use the Reachability class provided by the SDK itself. Look at this article on how to do so: How to check for an active Internet connection on iOS or OSX?

    This article here would give you further insights on internet connection as well: Testing internet connection on iPad app using ios5

    When you determined that it is not the internet connection, but a http server error. Make sure the http service you are calling is passing back the data properly. I use some REST client tools to check for this (REST Client)

    Finally, I tested out the URL you are trying to call on a browser, it throws a Bad Request error. Meaning it have nothing to do with your iOS code. If this server is under your control, you should fix that.

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

Sidebar

Related Questions

I'm using the following method in my code: - (NSMutableArray *) newOrderedArray:(NSMutableArray *)array ByKey:(NSString
I have written the following line of code: NSMutableArray *array=[[NSMutableArray alloc]init]; This allocates some
I am using following code to get source for image in wpf (image is
I am using the following code to write into a plist: NSMutableArray *d =
My object has a private NSMutableArray items. I am using the following code to
I am using the following code to save an NSMutableArray to disk: [myArray writeToFile:filePath
I am using the following code to add NSNumber to a NSMutableArray in header
I am using the following code to create a custom switch: UISegmentedControl* switchView=[[UISegmentedControl alloc]
Here I am having a situation, I'm using the following code: int x=0; for
I am using following code to color image on touch event.I have subclass uiview

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.