amysus
Lost but trying
Profile
Posts: 90
Reg: Oct 28, 2011
traveling the w...
3,650
10/19/12 01:22 PM (13 years ago)

How/Where to Put Files

Greetings - I am linking to an HTML file in my app. The file uses a JPlayer audio interface (using javascript and css). Locally, I have it working in HTML. But now I am unsure where to/how to add the files (and the folder structure) to XCode. I tried duplicating my local structure, putting everything (including an audio loop that the player is calling) into BT_Documents; it did not work. Must I put files in the folders that BT has set up (e.g., BT_sounds), or is that simply to help us organize? Thank you for you help, Amy
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
10/19/12 02:25 PM (13 years ago)
Never use xcode as don't have a mac however it may need to go into relevant folder within bt docs. @GoNorthWest just posted a video tutorial in the forum minutes before you posted. You may want to check it out as its about using the file manager to add stuff to your project. What a coincidence don't you think. All the best
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/19/12 02:49 PM (13 years ago)
Hi @amysus, The HTML and CSS files should go into BT_Docs. In your HTML, you just need to reference the CSS file by name, and not include any path information. Here's a link that talks about how to add Javascript to an Xcode project: http://stackoverflow.com/questions/2017937/how-to-add-js-file-to-my-xcode-project Remember that when you add a file into your source code download folders, you need to make sure you drag it into your Xcode project as well. Lots of people miss that step. To answer your last question, certain things do indeed belong in the folders that buzztouch provides, and the code will look for them there. You can, within those folders, create subfolders for organization, and still only need to reference the file name...Xcode will find it anywhere in that folder. Hope this helps! Mark
 
denikov
Lost but trying
Profile
Posts: 46
Reg: Dec 26, 2011
Reno Nevada
10,360
like
10/19/12 03:35 PM (13 years ago)
Does this work for Android also? I mean adding css file to the Docs folder in Eclipse? Also can you add .js files to Docs and it will work in ios and Android? As you can see I'm trying to do everything with html...:)
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/19/12 03:43 PM (13 years ago)
I believe that it works the same way. However, and I may be mistaken, I think images also have to go into the same folder at the HTML docs. They would not go in the res > drawable folder like all other images. But I may be mistaken. Mark
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
10/19/12 07:46 PM (13 years ago)
The images and other files like .js and .css files for android go in the BT_Docs folder.
 
amysus
Lost but trying
Profile
Posts: 90
Reg: Oct 28, 2011
traveling the w...
3,650
like
10/19/12 07:58 PM (13 years ago)
Hi Mark and all - Thank you for your feedback. I am still not getting it to work. Are you saying that I should not mention any folder in the path? So for example, I have a folder with the .js files. That folder is in the BT_Docs folder. On my HTML file, should I reference the path as js/file.js, or simply file.js? Also, what if a file is in another BT folder, e.g, the BT_Sound folder. In my HTML, should I at least ref that main folder, e.g., BT_Sound/myAudio.m4a? Thank you again, Amy
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/19/12 08:06 PM (13 years ago)
Nope, you just need to reference the file. So, it would be something like <src="audio.mp3"> instead of <src="BT_Docs/audio.mp3">. Same for any other file type. Mark
 

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.