Hi,
i need to use a
js file in my html page and show it in a webview. I have included the files in my project and wrote code to copy the files into the bundle.All files are copied except the
js file. How to copy the
js file into the bundle folder. The code i used is as follows:
NSFileManager *fileManager = [NSFileManager defaultManager];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDire ctory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSError *error;
AudioBg = [documentsDirectory stringByAppendingPathComponent:@"jquery.
js"];
defaultDBPathAudioBg = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"jquery.
js"];
NSLog(@"result %d",[fileManager copyItemAtPath:defaultDBPathAudioBg toPath:AudioBg error:&error]);
Thanks in advance..