Discussion Forums  >  Images, Documents, File Locations

Replies: 5    Views: 81

Sain
Veteran developer
Profile
Posts: 14
Reg: Jun 04, 2013
Chernivtsy
3,990
06/14/13 12:13 PM (11 years ago)

How to add .js files to project

Hi gays. I need your help. I designed few application screens in html using js and css. I have tried to add in in my project using html doc plugin, but it didn't work. Any recommendation, how to add .js files to my application?
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
06/14/13 12:51 PM (11 years ago)
If you're adding the .JS file to an Xcode project, make sure you find the file in your "Build Phases" and drag it from the "Compile Sources" list to the "Copy Bundle Resources" list.
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
06/14/13 12:52 PM (11 years ago)
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
06/14/13 01:14 PM (11 years ago)
Hi, This is also covered in this video tutorial of The Blog Pro Plugin. Hope it helps. Best Regards, Danny
 
Sain
Veteran developer
Profile
Posts: 14
Reg: Jun 04, 2013
Chernivtsy
3,990
like
06/14/13 02:19 PM (11 years ago)
Thanks for reply. After this manipulation I didn't receive any warnings, but js still didn't work. Same things with css and image files...
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
06/14/13 02:54 PM (11 years ago)
Hi, You have to make sure that you use relative urls. So if you link to an image you'd write: <img src="myimage.jpg" if you link to a css file you'd write: <link rel="stylesheet" type="text/css" href="main.css"> If you included a .js library, lot of times there is a folder structure. The files link to each other like ../../myJSfile.js If this is the case you need to change that to: myJSfile And look for these kind of links in every file. The folder structure in Xcode is only for human readability. Hope I made myself clear. Best Regards, Danny
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.