Discussion Forums  >  Uncategorized

Replies: 8    Views: 344

David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
08/10/11 12:54 AM (14 years ago)

Custom URL and Custom HTML / TEXT screens may not work...

The latest update to the source-code download (v1.5) is causing some trouble. We thought we had it figured out and some URL's are loading OK - others are not. We are continuing to try to figure this out and will post an update as soon as we do.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/10/11 01:17 AM (14 years ago)
We have uploaded another version of the BT_download.m file and the BT_screen_webView.m file. The update the other day was made in an attempt to fix some issues and created some others. It seems to be fine now. If you continue to have trouble (after downloading the latest source for your app) nudge this thread. The trouble is related to the device not knowing what type of content it's loading when URL's do not include document names. Example: http://www.mydomain.com/doc.html DOES have a document name but http://www.mydomain.com does not. See if you can break it ;-)
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
08/15/11 04:06 PM (14 years ago)
Hey David, Still have some issues with the custom url. Was working fine prior to the changes. This is the original url I was using and it worked fine, but no more: http://www.hotels.com/mobile/search.html?destinationName=Champaign,%20Illinois,%20United%20States Downloaded and recompiled today, but not go. Thoughts?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/16/11 12:13 AM (14 years ago)
Append 'saveAsFileName' to the end of the URL like this: http://www.hotels.com/mobile/search.html?destinationName=Champaign, iIllinois, United States&saveAsFileName=myCoolSearch.html This tells the device how to save the file. The issue arrises because iOS does not understand how to save all the possilbe file types it may be downloading. The crazy part, I'm not sure how this could have worked before but suddenly does not. For sure something change, just not sure what? Gotta love the code. I tested with the saveAsFileName appended (see example) and it works great. Idea: Because the UIWebView in the app is loading and saving HTML content, you may be better off adding a ForceRefresh to the screen's settings?
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
08/16/11 06:07 AM (14 years ago)
Thanks, David. That worked perfectly. I do have force refresh on as well. Looks like it is working fine. Much appreciated.
 
wendymadeit
Apple Fan
Profile
Posts: 82
Reg: Jan 12, 2011
location unknow...
820
like
09/02/11 07:53 AM (14 years ago)
I am having exactly the same problem - a web page worked, but after trying another URL, then re-entering the original URL, there's just a page with boxes & red x in corners... So, I tried to replicate the above solution, but can't really work out the pattern (where did myCoolSearch come from? is just an arbitrary name?) I also have force refresh on. URL =http://www.tec.tas.gov.au/index.html (this worked a week ago!!) I tried this -> http://www.tec.tas.gov.au/index.html&saveAsFileName=tec.html with no luck! I now get an error message that says - There was a problem saving some data to the devices cache? Any ideas? Tanx
 
wendymadeit
Apple Fan
Profile
Posts: 82
Reg: Jan 12, 2011
location unknow...
820
like
09/02/11 08:44 AM (14 years ago)
just tried another page with another URL & it worked fine...> http://www.tec.tas.gov.au/myreps is there any reason for this? the absence of .html in the URL maybe??? ?????
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/05/11 06:59 PM (14 years ago)
Could be the 'missing .html' in the file name. It's sort-of complicated...but...the idea is that the app needs to know the NAME of the file to save after it downloads. If there is no file name it will probabaly not work. mysite.com/stuff/ << this URL has no file name mysite.com/stuff/stuff.html << This URL does have a file name. If you don't control the path / url (not on your site) you could try a sneaky little trick in the URL. Add ?saveAsFileName=mypage.html to the end of the file. This tricks iOS into saving the file because you're giving it a file name. mysite.com/stuff/?saveAsFileName=mypage.html This does not always work because you dont' actually know what the server will return after appending that to the end of the file. I say this because it's possible that the web-master that runs the site / page you're pointing to may not allow this ;-)
 
wendymadeit
Apple Fan
Profile
Posts: 82
Reg: Jan 12, 2011
location unknow...
820
like
09/05/11 07:48 PM (14 years ago)
aaahhh, that last sentence could explain it!!
 

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.