Discussion Forums  >  Uncategorized

Replies: 3    Views: 339

mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
04/10/11 09:57 AM (14 years ago)

Can you use local file AND url for html's?

I plan on adding/updating my app for many months to years. I don't want to continually send updates to the iTunes store so what I would rather do is put new content online so that its immediately available and put it in the corresponding folders in my buzztouch project so the next time I do send off an update it will be included. In the long run I want these files in the project for quicker access. My question is what to do after an update is approved by Apple and goes live in the iTunes store. I can't automatically change the location in the buzztouch control panel to the local file since not everyone will have the update yet. So... my question is this. If I put the location for both a local file (say history.html) and the url (myweb.com/history.html) will that cause problems? I'm hoping if the local file can't be found it will just look to the url? Maybe?? Thanks!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/10/11 08:52 PM (14 years ago)
I'm confused. Not sure why you want to put ths same content in two places. One copy in the app and one at a URL seems unecessary. Maybe I'm missing something? To answer your qusetion, technically terms.. if you use a fileName and fileURL the fileURL will NOT be loaded if the local file exists in the Xcode project or in the cache (it's already been downloaded). If the local file does not exist, it will load the URL. Here's the order.. a) Look for project file in Xcode project (load if found, ignore URL) b) Look for cached version of file (it must have been downloaded from the URL previously and saved) c) No project file, no cached file, use URL and try to cache it for next time
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
04/11/11 02:27 AM (14 years ago)
Perfect! The reason I may at times put it in two places is because I want most of my html files included in the project. As I make new files I will put them online so they're readily available. But when I send off an update to the app store I will put the file into the xcode project for quicker retrieval. Since some people take awhile to download updates I don't want to automatically remove the url since they won't have access to the content anymore until they update. Thanks!
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
04/12/11 10:18 AM (14 years ago)
I realized last night that the buzztouch control panel won't let me put down both a file name and file url. As I mentioned it would be very helpful to me to have both up there since I plan on adding/updating content a lot and though I plan on adding everything to the project it will need to be online for awhile until the update comes out (don't want to send updates to itunes every week!). sooo, the next time you guys play around with the control panel would it be possible to add the option of having both file name and file url (looking for file name first)? ?? thanks either way... josh
 

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.