I'm trying to get 2 .js files and a .css file to load in a UIWebView application on iOS via a HTML file (which is being found).. but it's not working..
The files are already copied on Copy Bundle Resources under Build Phases etc..
This is the code so far on ViewController.m
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
NSString *htmlFile = [[NSBundle mainBundle] pathForResource:@"game1" ofType:@"html" inDirectory:nil];
NSString* htmlString = [NSString stringWithContentsOfFile:htmlFile encoding:NSUTF8StringEncoding error:nil];
//Append javascript
NSString *script = @"<script src>TheScript4.js</script>";
htmlString = [htmlString stringByAppendingString:script];
[self.webview loadHTMLString:htmlString baseURL:nil];
}
I'm running xcode6..
Any help in the right direction etc would be great, many thanks..