Why is path not working in Xcode 4.2? <p>I am learning to write an iOS-native webkit app. In Xcode 3.x, I have index.html distributed in Resources folder and the following code works correctly:</p> <pre><code>- (void)viewDidUnload { [super viewDidUnload]; NSString *filePath = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]; NSData *htmlData = [NSData dataWithContentsOfFile:filePath]; if (htmlData) { NSBundle *bundle = [NSBundle mainBundle]; NSString *path = [bundle bundlePath]; NSString *fullPath = [NSBundle pathForResource:@"index" ofType:@"html" inDirectory:path]; [webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:fullPath]]]; } } </code></pre> <p>The index.html is not loaded when I create a project on Xcode 4.2. I have the index.html in the "Supporting Files" folder. Have I missed something? Please help.</p> <p>Thanks</p> <p>Adrian</p>