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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:36:22+00:00 2026-06-13T05:36:22+00:00

I am trying to include a folder structure into my xcode project that contains

  • 0

I am trying to include a folder structure into my xcode project that contains html, css, js and images like below:

htmlcontent
    html
       test.html
    css
       test.css
    js
       test.js

I copied the folder and its subfolder to xcode and i can see the heirachy there but when i do the following:

NSString *pathToFile = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"html"];
NSURL *url = [NSURL fileURLWithPath:pathToFile isDirectory:NO];
[_webView loadRequest:[NSURLRequest requestWithURL:url]];

it prints:

/Users/scoota/Library/Application Support/iPhone Simulator/6.0/Applications/8AAC5870-DF24-49BB-BCB8-598C8C0A7C9A/TestApp.app/test.html

Is there a way to preserve the hierachy? The reason i ask is my html file has references to the css like so:

<link rel="stylesheet" type="text/css" href="htmlcontent/test.css" media="screen, projector" />

As a result the css is not loaded. If I change it to the following:

<link rel="stylesheet" type="text/css" href="test.css" media="screen, projector" />

it loads.

Any thoughts?

  • 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-13T05:36:23+00:00Added an answer on June 13, 2026 at 5:36 am

    When you add files to your Xcode project, make sure you select “make folder references” instead of “make groups for folders”

    However, shouldn’t that be ,,/css/test.css ?

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

Sidebar

Related Questions

I am trying to include a .js file into a php file. My folder
I have a folder structure that contains multiple javascript files, each of these files
I'm trying to include specific 'admin view' files from within a folder structure. I'm
I'm trying to ignore the bin folder of a web project, but include the
I have been trying to include the latest version of qextserialport into the project
I'm trying include this barcode source code Stefanhafeneger - Barcode github.com to my project
I am trying to include a binary file within a zip file and below
I am trying to include a .php file that will generate a form for
I find that including a template with this path works fine {% include 'AcmeDemoBundle:TemplateArchive:view.html.twig'
Here's the folder structure of my project: /ping --/Controller ----Ping_Conntroller_Main.php ----Ping_Conntroller_Db.php --/Model ----dbCredentials.php --/View

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.