Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-09-2010, 01:27 AM   #1 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 49
Angel is on a distinguished road
Default Problem with js file

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..
Angel is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 332
12 members and 320 guests
akphyo, cgokey, EXOPTENDAELAX, flamingliquid, GHuebner, guusleijsten, ohmniac, Paul Slocum, PavelSea, SLIC, Sloshmonster, Sonuye857
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,653
Threads: 94,115
Posts: 402,888
Top Poster: BrianSlick (7,990)
Welcome to our newest member, ohmniac
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:29 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0