简体   繁体   中英

Can I launch an iOS app to a specific location?

I have a website and an app. The website hosts tests (eg - online school tests).

Since some of the tests require audio / microphone / video recording capability, I have to create an iOS app to leverage the devices capabilities (they aren't all available via a mobile browser).

So, I've created an app that allows users to login using their website credentials and navigate to there tests (a folder structure). They can choose the test, run it, and voila!

However, I want to add a new user flow that enables a user who is on the website (via mobile browser) to launch into the app at the correct location. Eg the app launches straight to that specific test - rather than needing to go through the navigation part. Is there a way of doing this?

I should also note that the location will be dynamic (eg each test will have an ID, and new tests will be added all the time)

Cheers, Ollie

URL Schemes aka Deep Links

What you're looking for is URL Schemes . They are sometimes called 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.

Using URL schemes your app can be opened from websites or emails. You can also pass arguments in the URL . Then, use these arguments to navigate user to specific points in your app.

Now, that you know what to use, look for some tutorials. Here is one , or another one here .

Yes, this is possible. You must register an url scheme for your app and implement application: didOpenUrl: in your AppDelegate.

See here: Using URL Schemes to Communicate with Apps

You can launch your application using custom URL scheme .

Here you can pass additional data from mobile browser in form of URL which your iOS native application will receive. Based on data you are receiving, you can take appropriate decision.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM