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