【发布时间】:2019-12-23 10:18:23
【问题描述】:
我正在从 Bing 地图服务器下载图块。使用下面的 Url,它在 Android 和 UWP 平台上运行良好。但是在 iOS 中抛出异常“System.Net.WebException: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection”。
必应网址:
http://dev.virtualearth.net/REST/V1/Imagery/Metadata/Road?output=json&include=providers&key=
我尝试了以下解决方案(堆栈溢出链接),但它不起作用。然后,我将 http 更改为 https(安全 URL)。它工作正常,并且从 Bing 服务器下载了图块。
App Transport Security policy requires the use of a secure connection - IOS 9
我们是否只需要在 iOS 平台上使用安全 URL (https:) 来从 Bing 服务器下载图块?但是,打开使用 http 的街道地图 Url。
任何人请提供确切的解决方案,为什么应该在 iOS 中为 Bing 地图图块使用安全 url。?
问候, 婆罗洲
【问题讨论】:
-
您可以从 info.plist 的链接中添加代码。如果你想使用
https,请检查stackoverflow.com/questions/58894967/…
标签: ios xamarin.ios bing-maps