title: Reading a Javascript file in a Bundle to String Xcode IOS
body: <p>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.</p>
  
  <pre><code>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");
  </code></pre>
  
  <p>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);</p>