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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:29:53+00:00 2026-05-25T15:29:53+00:00

I have a download manager integrated into my iPhone App which allows the user

  • 0

I have a “download manager” integrated into my iPhone App which allows the user to save a webpage online to their documents folder on their device to view offline and locally. This works perfectly, except the files show with lots of HTML code rather than what they should look like.

Here’s the UITableView with files: http://cl.ly/3D2g0o3C3a302J243D3v
Here’s the UIWebView with the HTML in it instead of the usual webpage: http://cl.ly/2s1h3H3D1c1t3y1J2G0W

I’m loading my UIWebView like this (looks all fine?):

NSURL *url = [[NSURL alloc] initFileURLWithPath:documentsDirectory]; 
NSURLRequest *req = [[NSURLRequest alloc] initWithURL:url];
[webView loadRequest:req];

Why is this happening and what can I do to rectify this?

  • 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-25T15:29:53+00:00Added an answer on May 25, 2026 at 3:29 pm

    Use this line of code my friend,

    [WebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]isDirectory:NO]]];
    

    and here is a code that i use before:

    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *appSettingsPath = [documentsDirectory stringByAppendingPathComponent:@"index.html"];
    

    now, you have the file path in your document directory.
    then:

    [webview loadHTMLString:SiteString baseURL:[NSURL fileURLWithPath:appSettingsPath]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Inside a webpage I have an Excel download button, which redirects to a webpage
I have a rather complex application at https://github.com/BigBadOwl/iStreamer-Download-Manager which uses Rtmpdump and Ffmpeg libraries
I'm writing app for android device, which is simple download manager. I want to
I have an application which once the user runs the app it has a
I have a download manager of sorts that uses WebClient.DownloadFileAsync. Webclient doesn't seem to
If Safari/Firefox have already downloaded files then they keep a download manager window open.
I have big URL list, which I have to download in parallel and check
I'm doing a project which is similar to the Download Manager. One of the
If you have worked with IDM(Internet Download Manager) this has a item named Grabber
I'm writing a small download manager in C with libcurl, and have encountered an

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.