Discussion Forums  >  WebViews and HTML for Mobile

Replies: 31    Views: 134

Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
02/06/13 02:21 PM (11 years ago)

Integrate entire website

Hello to all, I have develop an entire website for iPhone (html+js+css+some images) The differents files are into differents directory (like css, ui, js, etc ...) I would like to include it into a BT application, but to view it offline, so i need to include all the files. What i need to do ? Juste create some HTML screen, include my code? what can i do with my js, css images files .... ? kind regards
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/06/13 02:25 PM (11 years ago)
I believe you can have everything in the same folder directory in XCode as on your website, and just use relative urls. Just keep in mind that if you're wanting it to be offline like you say, you will need to have ALL of your files offline - that means no linking to jquery scripts on Google repositories, etc.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/06/13 02:30 PM (11 years ago)
Keep in mind that Apple is a bit 'odd' in the way they approve apps... meaning, if it looks like all you've done is transfer a website from server to device, they may not approve it; you have to put in a few 'tricks' to make them happy. Cheers! -- Smug
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 02:31 PM (11 years ago)
Thank you chris1. No i don't link to jquery script on google. So i need to copy all to BT_DOCS ? without directory and just put the name of my object into the html code ? (for example i need to replace <link href="style/style.css" rel="stylesheet" type="text/css"> with <link href="style.css" rel="stylesheet" type="text/css"> that's it ?) For a good visibility i cannot keep the directories ? Regards
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 02:32 PM (11 years ago)
The website is builded like an iphone application with some of transition, but i need to make some screen with a good design and i don't find how i can do it with BT so i have do it with JS, but i use other plugin like blog contact etc ... from BT plugins
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
02/06/13 02:34 PM (11 years ago)
I think what I would do is create an HTML screen in buzztouch, and link it to your index.html file. All your files should go in BT_Docs, as Chris mentioned. You can keep the folder organization the way you have it...it should find the files regardless of where they are in the BT_Docs folder. Pay close attention to what @Smug said. If Apple doesn't see you take advantage of any native iOS features, and it basically looks like you have a web app, they'll very likely reject it. We've seen it reported tons of times on the forum that it's happened like that. Mark
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 02:39 PM (11 years ago)
Thank you GoNorthWest, so i can keep my folder organization. So if i understand i don't need to change the different link to the different files of my source code. because i have read some of topics say that i need to change it to relative url. Fo example if i put this <link href="style/style.css" rel="stylesheet" type="text/css"> It will be linked to BT_DOCS/style/style.css that's it ?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
02/06/13 02:41 PM (11 years ago)
Well, here's one area that I'm not sure. I believe what you can do is maintain a folder structure in BT_Docs, but make the href just the doc. So, instead of : href="style/style.css" It would be: href="style.css" And the app would find it anywhere in BT_Docs that it might be. That's worked for me on one of my apps.
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 02:42 PM (11 years ago)
Chrome crashed - double post
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 02:43 PM (11 years ago)
Chrome crashed - double post
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 02:44 PM (11 years ago)
Chrome crashed - double post
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
02/06/13 02:45 PM (11 years ago)
Gotta watch out for refreshing the page...it posts your previous post again!
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 02:46 PM (11 years ago)
Chrome crashed - double post
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 02:47 PM (11 years ago)
Chrome crashed - double post
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 02:52 PM (11 years ago)
Chrome crashed - double post
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 02:54 PM (11 years ago)
Chrome crashed - double post
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 02:55 PM (11 years ago)
Chrome crashed - double post
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 02:57 PM (11 years ago)
Chrome crashed - double post
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 02:57 PM (11 years ago)
Chrome crashed - double post
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/06/13 02:59 PM (11 years ago)
that's a lot of refreshes!
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 03:00 PM (11 years ago)
Chrome crashed - double post
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
02/06/13 03:01 PM (11 years ago)
Wow...starting to wonder if he's even reading the responses! Crazy!
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 03:03 PM (11 years ago)
Chrome crashed - double post
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 03:04 PM (11 years ago)
Arf not a refresh but my Chrome crashed ....
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 03:22 PM (11 years ago)
I have put it, change the link, and put all the file at the root of bt_docs but no display, just the text of my html without formating and without javascript any idea?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
02/06/13 03:24 PM (11 years ago)
Are you using the HTML Plugin, or the Custom URL plugin? You should be using the HTML Plugin. There is a trick to the Javascript, but I'd have to research it. You basically need to tell Xcode not to compile it.
 
Caradou
Apple Fan
Profile
Posts: 23
Reg: Feb 18, 2012
Lyon, France
730
like
02/06/13 03:30 PM (11 years ago)
No i have use the HTML plugin, i have paste my source code in the source tab and change the different link. After that i have copy all the file into BT_DOCS and compile my application I have add the JS into the project and exclude them from the compilation But no css applied, no js, and no image display
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
02/06/13 03:34 PM (11 years ago)
You want to use the HTML Plugin, not the Custom HTML/Text plugin. In the HTML plugin, you have the option to specify the filename you want that screen to show. I would suggest you point it to your index.html file. The Custom HTML/Text file saves the data to the buzztouch server, and ignores the local files.
 
GilbertAZ
Aspiring developer
Profile
Posts: 37
Reg: Jul 16, 2012
Arizona
2,820
like
02/06/13 03:52 PM (11 years ago)
Mark ... so in your index.html file on the BT server, you would have to give the full path to your JS file? I think I've tried to see if it sees the js file relative, so the full path wasn't going to work for me. Just wondering if there's another trick, I need to revisit this. Thanks.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
02/06/13 03:53 PM (11 years ago)
All the HTML and JS files should be in your BT_Docs folder. Then just reference the file directly in your HTML code, without any path information. If you are using the BT File Manager, and linking to the file via a URL, then it may be different. This is in-app copies of the file. Mark
 
GilbertAZ
Aspiring developer
Profile
Posts: 37
Reg: Jul 16, 2012
Arizona
2,820
like
02/06/13 04:33 PM (11 years ago)
I've tried referencing my JS file from my HTML ... all in the BT_Docs folder and it totally ignores JS. In my folder I had an HTML, CSS, JS ... i called it simply by <script src="my file.js"> the CSS I call using <link href="mystyle.css"> and the css works fine. Somehow it ignores *.js ... So i had to put the js on a remote server then http call it.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
02/06/13 06:52 PM (11 years ago)
@Alzooka - GoNorthWest mentioned this for JS files: "There is a trick to the Javascript, but I'd have to research it. You basically need to tell Xcode not to compile it." Alternatively, you can "de-construct" the Villa Grove Football app to see how the web files were incorporated into the BT app. I seem to remember every VGF Screen had its set of HTML, JS, CSS files. 1. Download the VGF App using iTunes onto your Computer. 2. Find the App within the Apps section and right-click to Show in Finder. 3. Make a copy of the App and put on your desktop. 4. Use an Unzip utility to get into the App's files. 5. Right-click on the .app file to show package contents. 6. Dig-and-explore to find the bt_config.txt file and the HTML Files. Happy hunting! -- Niraj
 

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.