Closed chrismorast closed 8 years ago
@chrismorast when tapping on an address the app is getting the following URL load requests: https://duckduckgo.com/l/?kh=-1&uddg=https%3A%2F%2Fbing.com%2Fmaps%2F%3Fobox%3D1%26q%3D135%2520George%2520Street%252C%2520Edinburgh%2520EH2%25204JH%252C%2520UK
https://bing.com/maps/?obox=1&q=135%20George%20Street%2C%20Edinburgh%20EH2%204JH%2C%20UK
https://www.bing.com/maps/?obox=1&q=135%20George%20Street%2C%20Edinburgh%20EH2%204JH%2C%20UK
https://www.bing.com/secure/Passport.aspx?popup=1&ssl=1
...etc.
I can't see into the javascript that is loaded from the DDG search results, but it doesn't seem like it's trying to open the Apple Maps URL. Can the results use the user-agent to detect if it's talking to the iOS app and, if so, use the Apple Maps URL format defined at the link below? https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/MapLinks/MapLinks.html
Would it be helpful if I just changed the user agent set for the client-side javascript to use the default (mobile safari) string with the DDG-iOS+version string appended to it?
Going to have to let @nilnilnil or @bsstoner make that call
No need to change user agent, we can fix this internally in the JS.
This conflicts directly with #128 from my understanding.
@bsstoner: @nilnilnil makes a great point there. I think both tickets would be resolved if we simply append the DDG-iOS-version tag to the default (mobile safari) user agent. Then servers/javascript that we don't control such as the imggur gifv stuff would treat us like mobile safari (which would be correct) and the DDG JS could still tell if it was running with the app as opposed to a normal browser.
Okay, we can do that. @nilnilnil Does that mean you're cool with changing the user agent? I wasn't sure what other implications there were aside from the device detection on the front-end.
There are web server changes we'll need to make. I expect the best thing to do in #128 is to use the DDG UA for DDG requests and the default for everything else.
@nilnilnil ok. Although on the app's side we can set the UA at a fine-grained level for http(s) requests, but for the navigator.userAgent setting that is accessed in javascript we can't choose which string that returns for individual pages or hosts.
@thm This should now be fixed with the latest build!
My guess is there's still an issue with setting the mobile parameter. When I click on an address link from within the app, it opens up bing maps when it should open up apple maps
cc @nilnilnil @sdougbrown @bsstoner