Jump between IOS apps and between apps and Safari, iossafari

Source: Internet
Author: User

Jump between IOS apps and between apps and Safari, iossafari

Recently, the project encountered such a requirement: jump from the APP to Safari and then jump back to the APP. Previously, it was easy to jump from an APP to Safari. It focuses on redirecting from Safari to the APP and from the APP to the APP. (In fact, these two are almost the same thing .)

First, jump from Safari to APP

To jump to the APP you specified, You need to define a special identifier in your APP, that is, a URL protocol.

Define the URL protocol such as TARGETS --> info --> URL Types --> Add a URL protocol


The URL Schemes field is the special identifier of your APP, and the indentifier field is the identifier of this URL protocol. (An APP can have multiple URL protocols)

The following two fields can be empty. Finally, run your APP.

Now is the time to witness the miracle.

Open the Safari browser in your simulator and enter: appABC: // in the address bar ://

Press enter and the result is what you want. (Isn't it easy ?)

Sometimes you may need to input some parameters when you jump back from Safari to the APP. What method can you use to receive these parameters?

Write the following method in the appdelegate. m file:


This method is automatically called by the system. It means that if the APP is automatically called through openURL. The parameter url is the specific URL to open the APP. That is, the above appABC: //, but how can we pass the parameter through this method?

The answer is in the URL. You can add any desired character parameter after appABC: //, for example, appABC: // name: wanglei // name: lilei

As for how to parse these parameters, it depends on how you handle them.

Below is the jump from APP (A) to APP (B)

As mentioned above, the principle between them is the same. From Safari to APP, the jump from APP (A) to APP (B) is through opening A specific URL) is it necessary to open a specific URL?

The answer is yes. How can I open this specific URL? In fact, there is such a method openURL in UIApplication, as shown below:

[[UIApplication using application] openURL: url]

The parameter URL is the URL represented by the specific URL protocol of APP (B) (a demo will be attached later)

The processing of parameters is the same as above.

The following is A demo of switching between APP (A) and APP (B ).

Http://download.csdn.net/detail/u012884714/7679105


This article is here. Please refer to the following link: LC.





The iphone uses safari to access the Internet. Every time the app store jumps out

Refresh the system. I think your website homepage is set to app store by default, or you set it, or you fl the system, and the virus does not work properly.

The name of B standing on the ios app store

A software in the nest can watch B station video, but it does not seem to be a B station client. Its introduction is "B station video will be automatically loaded" and its name is moebrowser.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.