我可以在特定位置启动 iOS 应用程序吗?

Can I launch an iOS app to a specific location?

我有一个网站和一个应用程序。该网站举办测试(例如 - 在线学校测试)。

由于一些测试需要音频/麦克风/视频录制功能,我必须创建一个 iOS 应用程序来利用设备功能(它们并非都可以通过移动浏览器使用)。

所以,我创建了一个应用程序,允许用户使用他们的网站凭据登录并导航到那里的测试(文件夹结构)。他们可以选择测试,运行 它,瞧!

但是,我想添加一个新的用户流程,使网站上的用户(通过移动浏览器)能够在正确的位置启动应用程序。例如。该应用程序直接启动到该特定测试 - 而不是需要通过导航部分。有办法吗?

我还应该注意,位置将是动态的(例如,每个测试都有一个 ID,并且会一直添加新测试)

干杯, 奥利

URL 方案又名深层链接

您要找的是URL Schemes。它们有时被称为 Deep Links.

A URL scheme lets you communicate with other apps through a protocol that you define. To communicate with an app that implements such a scheme, you must create an appropriately formatted URL and ask the system to open it. To implement support for a custom scheme, you must declare support for the scheme and handle incoming URLs that use the scheme.

使用 URL 方案可以从网站或电子邮件打开您的应用程序。您还可以在 URL 中传递参数。然后,使用这些参数将用户导航到您应用中的特定点。

现在,您已经知道要使用什么了,请查找一些教程。这里是 one, or another one here.

是的,这是可能的。您必须为您的应用程序注册一个 url 方案并在您的 AppDelegate 中实施应用程序:didOpenUrl:。

看这里: Using URL Schemes to Communicate with Apps

您可以使用 custom URL scheme 启动您的应用程序。

您可以在此处以 URL 的形式从移动浏览器传递额外数据,您的 iOS 本机应用程序将接收这些数据。根据您收到的数据,您可以做出适当的决定。