IOS UI debugging artifact, plugin Injectionforxcode use method

Source: Internet
Author: User

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

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.