Discussion Forums  >  Uncategorized

Replies: 6    Views: 266

baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
05/12/11 08:59 PM (14 years ago)

Custom HTML links v1.5 (strange behaviour)

I have a custom HTML page in my app. Within the custom HTML is a standard <a></a> link to an external web page. Upon clicking this link in the app I get a 'Would you like to launch Maps?' pop-up - behind this the web page loads as it should. If I click 'No' the pop-up goes away and I can browse the page. If I click 'Yes' then a strange Facebook page loads!
 
baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
like
05/12/11 09:04 PM (14 years ago)
Update: The 'Would you like to launch Maps?' pop-up occurs (I believe) because the web page being linked to contains a google map. If I link to a different page then it does not appear. Still strange though that if I selected 'Yes' a Facebook page loads!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/12/11 09:48 PM (14 years ago)
That is super-duper strange. And funny (kind of). Yes, the software is looking for occurances of special test in the URL. If things like 'google.maps' or 'itunes' or 'mailto' or 'sms' are in the URL to load, a confirmation opens to confirm the action. None of this explains the facebook load. Too funny. Do this... a) Run the app while connected to Xcode (in a device or in simulator) b) Open the console c) Navigate to the Custom HTML page and click the link. Tons of data is output to the console and it may show you where it's failing. If it shows you the URL It's trying to load, copy-n-paste it here so I can see it. Does this URL lead to facebook? The only way facebook show load is, um, if the UIWebView tries to load a facebook URL
 
baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
like
05/12/11 10:05 PM (14 years ago)
Cheers David, Here's the data from the console: 2011-05-13 17:00:59.287 rotorua[14484:207] BT_screen_customHTML: shouldStartLoadWithRequest 2011-05-13 17:00:59.288 rotorua[14484:207] BT_screen_customHTML: url to load: http://www.zorb.com/rotorua 2011-05-13 17:00:59.288 rotorua[14484:207] BT_screen_customHTML: url scheme: http 2011-05-13 17:00:59.288 rotorua[14484:207] BT_screen_customHTML: webViewDidStartLoad 2011-05-13 17:00:59.289 rotorua[14484:207] BT_screen_customHTML: showProgress 2011-05-13 17:00:59.289 rotorua[14484:207] BT_viewUtilities: getProgressView 2011-05-13 17:01:01.259 rotorua[14484:207] BT_screen_customHTML: shouldStartLoadWithRequest 2011-05-13 17:01:01.259 rotorua[14484:207] BT_screen_customHTML: url to load: http://maps.google.co.nz/maps?f=q&source=s_q&hl=en&geocode=&q=zorb+rotorua&sll=-41.244772,172.617188&sspn=175.050972,360&ie=UTF8&ll=-38.042413,176.205254&spn=0.183199,0.439453&z=12&iwloc=A&cid=4105630585791844958&output=embed 2011-05-13 17:01:01.259 rotorua[14484:207] BT_screen_customHTML: url scheme: http 2011-05-13 17:01:01.260 rotorua[14484:207] BT_screen_customHTML: confirmLink 2011-05-13 17:01:01.281 rotorua[14484:207] BT_screen_customHTML: shouldStartLoadWithRequest 2011-05-13 17:01:01.281 rotorua[14484:207] BT_screen_customHTML: url to load: http://platform0.twitter.com/widgets/tweet_button.html?_=1305262861280&count=horizontal&lang=en&text=ZORB.com%20-%20ZORB%20Rotorua&url=http%3A%2F%2Fwww.zorb.com%2Frotorua 2011-05-13 17:01:01.281 rotorua[14484:207] BT_screen_customHTML: url scheme: http 2011-05-13 17:01:01.282 rotorua[14484:207] BT_screen_customHTML: webViewDidStartLoad 2011-05-13 17:01:01.282 rotorua[14484:207] BT_screen_customHTML: showProgress 2011-05-13 17:01:01.286 rotorua[14484:207] BT_screen_customHTML: shouldStartLoadWithRequest 2011-05-13 17:01:01.286 rotorua[14484:207] BT_screen_customHTML: url to load: http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fhome.php%23%21%2FZORBltd&send=false&layout=standard&width=300&show_faces=false&action=like&colorscheme=light&font=arial&height=24 2011-05-13 17:01:01.286 rotorua[14484:207] BT_screen_customHTML: url scheme: http 2011-05-13 17:01:01.287 rotorua[14484:207] BT_screen_customHTML: webViewDidStartLoad 2011-05-13 17:01:01.287 rotorua[14484:207] BT_screen_customHTML: showProgress 2011-05-13 17:01:02.034 rotorua[14484:207] BT_screen_customHTML: webViewDidFinishLoad 2011-05-13 17:01:02.034 rotorua[14484:207] BT_screen_customHTML: hideProgress 2011-05-13 17:01:02.271 rotorua[14484:207] BT_screen_customHTML: webViewDidFinishLoad 2011-05-13 17:01:02.271 rotorua[14484:207] BT_screen_customHTML: hideProgress 2011-05-13 17:01:02.604 rotorua[14484:207] BT_screen_customHTML: webViewDidFinishLoad 2011-05-13 17:01:02.605 rotorua[14484:207] BT_screen_customHTML: hideProgress 2011-05-13 17:01:11.661 rotorua[14484:207] BT_screen_customHTML: actionSheetClick for button index: 0 2011-05-13 17:01:11.662 rotorua[14484:207] BT_screen_customHTML: launching native app: http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fhome.php%23%21%2FZORBltd&send=false&layout=standard&width=300&show_faces=false&action=like&colorscheme=light&font=arial&height=24 Off to pick up the wife now so won't be able to reply for a while but appreciate your help.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/12/11 10:30 PM (14 years ago)
Good stuff. Please confirm (when you get back) that this output is the output from clicking ONE link. In other words, get to the web-page in the app, Clear the console, then click the link. The single click action will output a bunch of stuff like above and everythign it outputs will associated with that one single action - the one click. I'm asking you to confirm this because, as you can see, the UIWebView sometimes loads many times for ONE click. I just need to make sure this output (what you pasted above) is not the result of clicking several differen things in web page. Hope this make sense.
 
baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
like
05/12/11 10:36 PM (14 years ago)
Hey David - i'm running late for the wife, but needs must!!! This is the output from clicking the link in the custom HTML AND then selecting 'YES' when asked 'Would you like to launch Maps?' After bit more thought not really sure why it asks about launching maps since the google map is just embeded into the web page. Anyway, really won't be able to reply for a while now!!! Thanks again.
 
baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
like
05/12/11 10:37 PM (14 years ago)
Just to clarify it is 1 single link clicked in the HTML - http://www.zorb.com/rotorua
 

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.