Here today to tell you about the Xcode engineering debugging method, which is often used in the daily development. For example, you want to give other projects a framework for the library, first you need to be on your own side of the library to develop the function, and the test passed before you can submit to others, but if there is an exception in the middle run process, you have to go through the following steps: Modify the logic--> repackaging-- > Join the Project Test. This is not only inefficient, but it is not easy to find errors in the code in the library.
First create a new static IOS Framework project, Xcode need to install through the Ios-universal-framework-master plug-in, the installation steps can refer to the Internet.
Then create a new. h and. m file and put the. h file you want to call into the headers
Once compiled, a library of the. Framework is generated.
Next, create a new test project (normal single view works), then right-click the project name to select "Add file to" into your test project and select the file for your. Framework Engineering documents. But before adding, you have to put. The framework works closed, otherwise the remaining documents of the project will not be displayed.
Select the engineering file for the test project, select Build phases, and click the plus sign in Link Binary with libraries:
Select the. Framework engineering add under Workspace. The project before the joint is shown in the picture. The framework is red.
After command + B, the framework project was successfully compiled. So the two works of the link is successful, we can in the. framework of the next breakpoint, when running here will stop at the breakpoint, if found that the error only need to change after command+b can be greatly improved efficiency.