I have integrated a static compiled library into my project, which includes a JavaScript resource.
At a specific event in my app, I need to execute the JavaScript file from this library.
However, I am facing an issue where the path to the JS file appears to be null.
I attempted the 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"];
My library does not contain a bundle, and while looking for solutions on Stack Overflow, it seems like iOS does not support dynamic loading of bundles.
I have included the Js file in "Copy Bundle Resources".
Could someone please point out if there is anything that I am overlooking?
Thank you, KplMax