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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:24:39+00:00 2026-06-13T03:24:39+00:00

This question is very similar to this one . However, the accepted answer (and

  • 0

This question is very similar to this one.

However, the accepted answer (and the only answer) does not solve my problem.

I have a “hybrid” iOS app containing among other things a UITabView with a set of UIWebViews showing some app content in HTML5 from a web server. Under the hood there is a little home-made cache engine that caches content in the background. This cache engine fills its data using this line

[NSData dataWithContentsOfURL:request.URL options:NSDataReadingUncached error:&error];

So far the app has worked perfectly without any problems, but in iOS 6, it is not working anymore. Using the debugger I have came to conclusion that it is the above line that is not working. When I step accross the above line it just cant load the page, and after a while I get an error 256. When I switch to iOS 5, it works perfectly.

I have printed the NSURL-object request.URL and it looks like it should and it does have the “http://”-part included, like this:

http://app.customername.com/.mvc/MobileApp/Index

I also tried loading a test page that is unrelated to the application website, a very simple html-page that I made myself, and also http://www.google.com

Both of them worked in iOS 5.1 but the same problem occurred with these pages in iOS 6.

I also tried using the method without the “Uncached” option like this, but still no luck:

[NSData dataWithContentsOfURL:request.URL]

Has something changed in iOS 6 for the method data dataWithContentsOfURL: and has someone else seen this problem?

  • 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-13T03:24:40+00:00Added an answer on June 13, 2026 at 3:24 am

    So, I was having the same exact problem, and I don’t know the exact cause.

    I’m assuming it has something to do with the NSURLCache thread not playing nice with dataWithContentsOfURL. If anybody knows why please chime in.

    Bottom line, I already had ASIHTTP in my project, so I replaced this:

    NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]];
    

    With this:

    ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:url]];
    [request startSynchronous];        
    NSData *data = [request responseData];
    

    And now all is well.

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

Sidebar

Related Questions

I have a problem very similar to the one mentioned in this question .
I have a very similar problem to the one described in this question .
My question popped up a very similar question, this one . But the accepted
My problem is very similar to this question , however I am posting a
My current problem is very similar to this one . I have a downloadFile(URL)
I know that this is a repeated question. I have found very similar questions
This question may be very similar to my one, but I cannot see the
This question is very similar to that posed here . My problem is that
I found a very similar question to mine, but not exactly the same. This
This is a very similar question to Backbone not binding events to jQuery Popover

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.