0

我正在使用 iOS自定义 URL 方案,我想在 sygic 应用程序中创建一个路由。正如他们在加载 json (.sif) 行程的文档中提到的,我正在使用他们的自定义 URL 方案

com.sygic.aura://route%7Cmyitinerary.sif

加载我的 .sif 文件。

{
	"name":	"test",
	"version":	"2.2",
	"directives":	{
		"allowItineraryEdit":	true
	},
	"routeParts":	[{
			"properties":	{
				"routeMappingType":	"none",
				"precomputed":	false,
				"map":	"NT:2017.09"
			},
			"waypointFrom":	{
				"lon":	-315442,
				"lat":	5149939,
				"lonNavi":	-315442,
				"latNavi":	5149939,
				"type":	"start",
				"waypointId":	-1,
				"hitRadius":	50,
				"hitSpeed":	50,
				"caption":	"Barons Court Road 21/34, Cardiff, Penylan",
				"realtimeStatus":	{
					"status":	"visited",
					"estimatedTimeArrival":	"2018-04-17T13:08:15Z",
					"timeRemaining":	0,
					"distanceRemaining":	0,
					"edited":	false
				}
			},
			"waypointTo":	{
				"lon":	-312245,
				"lat":	5151827,
				"lonNavi":	-312245,
				"latNavi":	5151827,
				"type":	"via",
				"waypointId":	-1,
				"hitRadius":	50,
				"hitSpeed":	50,
				"caption":	"Llanrumney Avenue 193/218, Cardiff, Llanrumney",
				"realtimeStatus":	{
					"status":	"unvisited",
					"estimatedTimeArrival":	"2018-04-17T13:19:34Z",
					"timeRemaining":	679,
					"distanceRemaining":	4214,
					"edited":	false
				}
			}
		}, {
			"properties":	{
				"routeMappingType":	"none",
				"precomputed":	false,
				"map":	"NT:2017.09"
			},
			"waypointFrom":	{
				"lon":	-312245,
				"lat":	5151827,
				"lonNavi":	-312245,
				"latNavi":	5151827,
				"type":	"via",
				"waypointId":	-1,
				"hitRadius":	50,
				"hitSpeed":	50,
				"caption":	"Llanrumney Avenue 193/218, Cardiff, Llanrumney",
				"realtimeStatus":	{
					"status":	"unvisited",
					"estimatedTimeArrival":	"2018-04-17T13:19:34Z",
					"timeRemaining":	679,
					"distanceRemaining":	4214,
					"edited":	false
				}
			},
			"waypointTo":	{
				"lon":	-314670,
				"lat":	5152479,
				"lonNavi":	-314670,
				"latNavi":	5152479,
				"type":	"finish",
				"waypointId":	-1,
				"hitRadius":	50,
				"hitSpeed":	50,
				"caption":	"Pentwyn, United Kingdom",
				"realtimeStatus":	{
					"status":	"unvisited",
					"estimatedTimeArrival":	"2018-04-17T13:29:51Z",
					"timeRemaining":	1296,
					"distanceRemaining":	10859,
					"edited":	false
				}
			}
		}]
}

应用程序被触发并打开。但我收到了一条奇怪的消息,如屏幕截图所示。

谁能帮助我为什么会遇到这个问题?

在此处输入图像描述

4

1 回答 1

1

问题出在文档上,因为由于 iOS 上的文件访问限制,此自定义 url 不适用于仅适用于 Android 应用程序的 iOS。唯一的解决方法是使用 com.sygic.aura://route_download | url(sif 或 json)并将此行程文件上传到某处(应该是 https 服务器,因为 Apple 仅将应用程序限制为安全限制)

于 2018-04-24T14:26:01.300 回答