Communication between IOS programs

Source: Internet
Author: User

1. What is inter-program communication: Personal understanding is, for example, two programs, program A and program B, by clicking on the method in program a, wake Up program B, enter program B, and pass the value of program a into program B;

2. Why are there communication between programs?

In iOS, because the program itself uses the sandbox structure, is isolated from each other, relatively closed, the only way to communicate between programs is to use the interface provided by Apple using URL scheme, there is no better way.

3. Below we will implement communication between the following programs: A--->b

3.1 First we create 2 new projects A and Project B:

3.2 After the build, we are now going to implement a switch to B, so we set his URL in Project B:

3.3 Now we go to project A to add the implementation code:

3.4 Then go to Project B to implement the Add code:

3.5 Next we run engineering A and B separately, then click on Project A's project screen to OK, as follows:

Communication between IOS programs

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.