MapQuest, Cordova and SSL error

2 posts / 0 new
Last post
rwillett
MapQuest, Cordova and SSL error

Hi,

We already have an existing app in the Apple App store and Google Play that uses leaflet.js and Cordova (Jambuster, though its only available in the UK). We currently use our own OpenStreetMap server but are evaluating map servers that can provide traffic information, which OSM doesn't do.

We've looked through the docs (https://developer.mapquest.com/documentation/leaflet-plugins/maps) and can't seem to get our app to work with your plugins with IOS 9 though we can with iOS 8.4

  1. Does MapQuest work correctly with Cordova (and Ionic which is really Cordova) and iOS 9? We looked through the forums and can't see anything that references Cordova. We can see that you want to download your own mq-map.js, this fails for us on Xcode with an SSL error.

    In Safari
    [Error] Failed to load resource: An SSL error has occurred and a secure connection to the server cannot be made. (mq-map.js, line 0)

    In Xcode (we think its this error, Xcode is as normal, vague and unhelpful)
    2016-07-17 07:02:40.911 Jambuster[67313:2070102] CFNetwork SSLHandshake failed (-9824)

    2016-07-17 07:02:40.912 Jambuster[67313:2070145] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824)

    We've updated our Content Security Policy flags and the CORS access-origin tags with what we would normally expect to do, i.e. we keep looking at the output of Safari and fixing the CORS messages until they all go away :)

    This type of error message normally occurs when there is a TLS handshaking error with IOS 9. We do NOT get this error on Android. The last time we saw this error was with Amazon Web Services. Since your code mq-map.js references a lot of https servers we couldn't work out which one (if any) was giving the error. We didn't want to create masses of exceptions in our NSAppTransportSecurity section in the plist. 

    Due to this error we get the subsequent error that MQ was not found in our JavaScript code, which is what we expect.

    If we test on iOS 8.4, we do not get this error, which does seem to point to an issue with ATS. We can evaluate on 8.4 and Android for the moment though so its not the end of the world.

  2. Are you planning to put a search function on your forums or indeed on your site? Thats a hint BTW ;)
  3. If Cordova is supported, it would be helpful to have a page on using your code with Cordova. e.g. It would be really good to have a list of the https services that are called so that the CSP and CORS is easier to set up. We can provide ours if that helps.
  4. We can't seem to get traffic tiles to work for London. If we change the center of our map to New York we can see traffic lines, but we get nothing for London when we center back there, no matter what the zoom level. We can see the icon for a missing image though on our screen. Does London have traffic information please?

Point 4 is the key for us, we know we can fix the SSL issues to get it working on iOS 9, however there is no point if traffic is not available for London. We have just found the following statement "Our standalone traffic service offers easy access to traffic flow information, traffic incidents, and construction information for major cities across the United States and Canada." which seems to indicate that you don't.

Thanks

Rob

 


MQBrianCoakley
MapQuest does not have any
MapQuest does not have any Cordova specific tools. You may want to try http or https or maybe you can specify exception domains in your app's Info.plist file. MapQuest does provide an iOS sdk to display maps inside applications.   A search function has been requested and should be coming in the not too distant future. Thanks for the suggestion!   Traffic is available in the US and Canada. There is no European traffic data (yet). Sorry.