Move the index file to the root of the resources

dir.

This will stop the DOM errors for localStorage!
This commit is contained in:
Corey Johnson
2011-09-12 12:17:41 -07:00
parent 0b66c5483b
commit 33048bc971
3 changed files with 4 additions and 5 deletions

View File

@@ -40,10 +40,9 @@
[jscocoa evalJSFile:requirePath];
NSURL *resourceURL = [[NSBundle mainBundle] resourceURL];
NSURL *htmlURL = [resourceURL URLByAppendingPathComponent:@"static"];
NSURL *indexURL = [htmlURL URLByAppendingPathComponent:@"index.html"];
NSString *html = [NSString stringWithContentsOfURL:indexURL encoding:NSUTF8StringEncoding error:nil];
[[webView mainFrame] loadHTMLString:html baseURL:resourceURL];
NSURL *indexURL = [resourceURL URLByAppendingPathComponent:@"index.html"];
NSURLRequest *request = [NSURLRequest requestWithURL:indexURL];
[[webView mainFrame] loadRequest:request];
}
}

View File

@@ -8,7 +8,7 @@ task :build do
dest = File.join(built_dir, contents_dir, "Resources")
%w( src docs static plugins test vendor ).each do |dir|
%w(index.html src docs static plugins test vendor ).each do |dir|
rm_rf File.join(dest, dir)
cp_r dir, File.join(dest, dir)
end