In my project I am including a static compiled library, which has a javascript resource in it.
Now in my App at a particular event I want to run that javascript file from my library.
But when I try to access the js file the path is null.
I tried following code:
NSString *jsFilePath = [[NSBundle mainBundle] pathForResource:@"myJavaScript" ofType:@"js"];
and
NSBundle *staticBundleName = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"libCalC" ofType:@"bundle"]];
NSString *filePath = [staticBundleName pathForResource:@"myJavaScript" ofType:@"js"];
There is no bundle in my library, I found some posts on stack overflow to get the resource files from bundle but iOS doesn't allow dynamic loading of bundles also.
I have included the Js file in Copy bundle resource.
Am I missing something here, please guide. ?
thanks KplMax