I have tried this in a variety of ways and yet it never pops out my file as a string. Any help would be much appreciated. Perhaps a fresh set of eyes can get it.
static NSString *JSParse;
JSParse = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"nameFinder" ofType:@"js" ] encoding:NSUTF8StringEncoding ];
NSString *filepath = [[NSBundle mainBundle] pathForResource:@"nameFinder" ofType:@"js"];
NSLog(filepath);
if (filepath)
{
NSString *someJscript = [NSString stringWithContentsOfFile:filepath];
NSLog(someJscript);
}
NSLog(@"StartParse");
NSLog(JSParse);
NSLog(@"End Parse");
The end goal is to use javascript to parse HTML from a website that isn't mine and yes it sucks. (Parsing although my code is suspect too at this point);