The project is getting bigger, the code compiles more and more, you are tired of changing a little bit of UI layout to recompile the project process, we a minute millions of up and down, how can be compiled waste precious time. Use the Injectionforxcode plugin to improve the efficiency of our programming.
First plug-in GitHub address: Injectionforxcodegithub Address
Official demo
Look at the powerful effect, that is, write to see the effect:
Installation
We can install through the Alcatraz, if the installation successfully did not find more than two options, we download the plugin--open the project, after compiling, restart Xcode.
Open Xcode again we can see two more options under the Product menu
Test
-(void) viewdidload { [super Viewdidload]; = [Uicolor whitecolor]; [Self Setuptableview];} -(void) injected{ [self viewdidload];}
Note that: Injected,corl + = Update the interface, you can see the effect.
Real-Machine debugging
In addition, we want to dispatch the real machine, online said to add the script these, I tried not. Also found a solution
Since we are running in the simulator, we can see that there are more folders in the directory.
The first step:
Click "Patch Project for Injection" to insert the relevant code for the real machine. If the next time we do not need to debug the real machine, click on the "Revert injection ' s changes" can be eliminated.
Insert the relevant code that we can see in the main.m file, such as:
Step Two:
We crol+= run, found an error, as follows:
The basic meaning is: The real machine debugging, requires the user certificate, but our system binds a number of certificates, let us under Debug-iphoneos binding a We need to debug the real machine certificate.
We open the file now, we will find a more "Iosinjectionproject" folder, we need to find identity.txt this file
When you open it, you see
After that, we check the binding needs to debug the real machine certificate, direct command + C copy, do not hand-hit
Paste into the identity.txt. Be careful not to hand knock, there are spaces.
After saving, we then control + =, has succeeded.
Error handling
1. The file to compile is not selected. We need to select the controller file that currently needs to be debugged.
2. The operation has no effect. Plus:
-(void) injected{ [self viewdidload];}
IOS UI debugging artifact, plugin Injectionforxcode use method