views:

17

answers:

1

First my structure:

Application
|---> dirA
    |---> dirB
        |---> index.html 
        |---> somefile.js
    |---> dirC
        |---> index.html 
        |---> somefile.js
    |---> dirD
        |---> index.html 
        |---> somefile.js

some problems here. i need to load the index.html of this different dirs in my webview. but i don't know how to get the url for a specific dir, lets say dirB inside dirA and i got a notice Warning: Multiple build commands for output testo4.app/index.html. The problem is, i cannot rename the files, for that i created subdirectories (real direcories, not only "groups" from xcode)

thanks for all hints!

A: 

If those are real directories, their paths should be testo4.app/dirA/dirB/index.html, testo4.app/dirA/dirC/index.html and testo4.app/dirA/dirD/index.html, shouldn't they?

With the files being inside your bundle, you could use something like

NSString *path = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"index"] ofType:@"html" inDirectory:[NSString stringWithFormat:@"dirA/dirB/"]];

for the one inside dirB, for instance.

Aloha Silver
works fine! thanks. no idea why i didn't try that O.o
choise