"go" to those handy iOS development tools

Source: Internet
Author: User
Tags imageoptim
<span id="Label3"></p>Original: http://www.devtang.com/blog/2014/06/29/ios-dev-tools/<br>Objective<p><p>From Apple's invention of the iphone, one of the stories on appstore, like Flappy bird, has stimulated a large number of developers to join the mobile development army. As these developers emerge, there are a number of tools that are handy for iOS Developers. These tools, as an important link in the entire application development ecosystem, greatly facilitate the application developers and save time for application Development.</p></p><p><p>This article will introduce these excellent applications from 3 aspects of Application tools, command line tools, and plug-in Tools.</p></p>Graphical Application Tools Charles<p><p></p></p><p><p>Charles (http://www.charlesproxy.com) is a common tool for intercepting network packets under mac, and when doing iOS development, we often need to intercept network packets for debugging and Server-side network communication protocols. By setting himself up as a network Access Proxy for the system, Charles enables all network access requests to be done through it, enabling the interception and analysis of network Packets.</p></p><p><p>Charles detailed instructions for use, Welcome to read my article: "ios Development tools-network Packet Analysis tool charles"</p></p>Interface debugging<p><p>Ponydebugger (https://github.com/square/PonyDebugger), Reveal (http://revealapp.com/), Spark Inspector (http/ Sparkinspector.com/) is the three commonly used interface debugging tools to dynamically debug the iOS app interface while the program is Running. Ponydebugger is free and open-source, and the latter is charged, but more Powerful.</p></p><p><p>For dynamic or complex interactive interfaces, the handwriting UI is unavoidable, and the reveal class of tools allows us to see whether the corresponding properties of the control are normal, and to dynamically modify the interface elements while the program is Running. So you don't have to change the code and restart the program again and Again.</p></p>Xscope<p><p>Xscope (http://xscopeapp.com/) is a kind of tool set related to interface Development. For iOS development, the more useful features include its magnifier color tool, ruler tool, and More. The magnifying glass tool can collect multiple color sets to facilitate subsequent use, and support paste directly into the relevant program color Code.</p></p><p><p>Xscope is a paid software, and there are some limitations on the features of the unpaid Version.</p></p>Imageoptim<p><p>Imageoptim (http://imageoptim.com/) is a free tool for image Compression. iOS works by default uses the Pngcrush command to compress the picture, but its compression ratio is not really high. For readers with more picture resources in the app, try using Imageoptim to achieve maximum image Compression.</p></p><p><p>If you have never tried the Imageoptim type of image compression tool, then the first time to the IPA file slimming effect should be more amazing. My personal experience is that imageoptim can reduce the use of at least 10% of the Application's image resources for the first Time.</p></p><p><p>The principle of imageoptim is to use a variety of open source image compression tools, and then take the one that Works Best. The tools it tries include: pngout, zopfli, pngcrush, advpng, extended optipng, jpegoptim, jpegrescan, Jpegtran and Gifsicle.</p></p><p><p>The installation method is to download the program files from its official website (http://imageoptim.com/) and drag them to the "applications" directory. This article is all the mapping, you can see the use of Imageoptim to achieve a 29.5% reduction in Volume.</p></p><p><p></p></p>Mark Eel<p><p>Mark Eel (http://www.getmarkman.com/) is a free labeling tool developed by the chinese, which can conveniently mark the size, color, margin and description of the corresponding interface elements in the art output design Manuscript.</p></p>Command-Line tools Cocoapods<p><p></p></p><p><p>As each language develops to a single stage, the corresponding dependency management tool or central code repository Appears. such as the Java Maven,nodejs of NPM and so On. Cocoapods (http://cocoapods.org/) is a tool that provides dependency management for iOS Programs. Developing iOS projects inevitably uses Third-party open source libraries, and the advent of cocoapods allows us to save time setting up and updating Third-party open source Libraries.</p></p><p><p>When I developed the Ape bank client, it used 24 Third-party open source Libraries. Before using cocoapods, I need to:</p></p> <ol> <ol> <li>Copy the source code files of these third-party open source libraries into your project, or set them as Git submodule.</li> <li>For these open-source libraries, which usually depend on some of the framework of the system, I need to manually add these framework one by one to the project dependencies, for example, a network library will need to add the following framework:cfnetwork as Usual. systemconfiguration, mobilecoreservices, coregraphics, zlib.</li> <li>For some open source libraries, I also need to set <code>-licucore</code> or <code>-fno-objc-arc</code> wait for compilation parameters</li> <li>Manage updates for these dependent packages.</li> </ol> </ol><p><p>These physical activities, though simple, have no technical content and waste Time. After using cocoapods, I only need to put the Third-party Open Source Library in a file named podfile, and then execute it <code>pod install</code> . Cocoapods will automatically download the source code of these third-party open source libraries and set up the corresponding system dependencies and compilation parameters for my Project.</p></p><p><p>There are a few things to keep in mind when using cocoapods:</p></p> <ol> <ol> <li>You need to use The. Xcworkspace file generated by Cocoapods to open the project instead of the Previous. xcodeproj File.</li> <li>Each time you change the podfile file, you need to execute the <code>pod update</code> command again.</li> <li>When you do <code>pod install</code> , in addition to podfile, Cocoapods will also generate a file named <code>Podfile.lock</code> , you should add this file to version Management. Because Podfile.lock locks the version of the current dependent library, it will change if the <code>pod install</code> version is not changed after multiple executions <code>pod update</code> <code>Podfile.lock</code> . The advantage is that when multiple people collaborate, you can ensure that Everyone's Third library environment is exactly the Same.</li> </ol> </ol><p><p>Detailed instructions for use, Welcome to read my article: "using cocoapods to do iOS program dependency management"</p></p>Nomad<p><p>Nomad (http://nomad-cli.com/) is a handy command-line tool for you to operate Apple Developer center, including the convenience of adding test devices, updating certificate files, adding app ids, Verify the credentials of the iap, and so On.</p></p><p><p>Installation Method:</p></p> <table> <tbody> <tr> <td class="gutter"><pre class="line-numbers"><span class="line-number">1</span></pre></td> <td class="code"><pre><code><span class="line">gem install nomad-cli</span></code></pre></td> </tr> </tbody> </table><p><p>After the installation, the first execution <code>ios login</code> , your developer account password will be stored in the keychain, then you can use the command line to complete a variety of background operations, such as:</p></p><p><p>To add a test device:</p></p> <table> <tbody> <tr> <td class="gutter"><pre class="line-numbers"><span class="line-number">1</span></pre></td> <td class="code"><pre><code><span class="line">ios devices:add "TangQiaos iPhone"=<Device Identifier></span></code></pre></td> </tr> </tbody> </table><p><p>Update the certificate file:</p></p> <table> <tbody> <tr> <td class="gutter"><pre class="line-numbers"><span class="line-number">1</span></pre></td> <td class="code"><pre><code><span class="line">ios profiles:devices:add TangQiao_Profile "TangQiaos iPhone"=<Device Identifier></span></code></pre></td> </tr> </tbody> </table><p><p>Nomad also has a number of features that suggest you read the documentation on its official website for further Study.</p></p>Xctool<p><p>Xctool (https://github.com/facebook/xctool) is Facebook's open source, an iOS compilation and testing Tool. Using it instead of using Xcode's UI interface is because it is a pure command-line tool. For example, we can use Xctool to compile and unit test the commands, and then integrate the test results into jenkins, which enables automated continuous Integration. Although Apple also launched its own automated integration tool bot on OSX server, its configuration and use are still not very convenient.</p></p><p><p>To install xctool, You can use the brew command:</p></p> <table> <tbody> <tr> <td class="gutter"><pre class="line-numbers"><span class="line-number">1</span></pre></td> <td class="code"><pre><code><span class="line">brew install xctool</span></code></pre></td> </tr> </tbody> </table><p><p>To compile a project using xctool, you can use the following command:</p></p> <table> <tbody> <tr> <td class="gutter"><pre class="line-numbers"><span class="line-number">1<span class="line-number">2<span class="line-number">3<span class="line-number">4</span> </span> </span></span></pre></td> <td class="code"><pre><code><span class="line">path/to/xctool.sh <span class="line"> -project YourProject.xcodeproj <span class="line"> -scheme YourScheme <span class="line"> build</span></span></span></span></code></pre></td> </tr> </tbody> </table><p><p>To perform unit tests using xctool, you can use the following command:</p></p> <table> <tbody> <tr> <td class="gutter"><pre class="line-numbers"><span class="line-number">1<span class="line-number">2<span class="line-number">3<span class="line-number">4</span> </span> </span></span></pre></td> <td class="code"><pre><code><span class="line">path/to/xctool.sh <span class="line"> -workspace YourWorkspace.xcworkspace <span class="line"> -scheme YourScheme <span class="line"> test</span></span></span></span></code></pre></td> </tr> </tbody> </table><p><p>Xctool also has a lot of features, it is recommended that you read the Xctool official website to learn more about the Features.</p></p>Appledoc<p><p>Appledoc (https://github.com/tomaz/appledoc) is a tool for extracting documents from source Code.</p></p><p><p>For developers, the document is best and source together, so the update is more convenient and handy. A language like Java itself comes with the Javadoc command, which extracts documents from the source Code. Appledoc is a javadoc-like command-line program that extracts the appropriate annotations from the source code of the iOS project to generate the Help Documentation.</p></p><p><p>Compared to other document generation tools, the advantages of Appledoc are:</p></p> <ul> <ul> <li>Its default generated document style is consistent with Apple's official Documentation.</li> <li>Appledoc is written with objective-c, the necessary time to debug and change is also more Convenient.</li> <li>It can generate docset and integrate into Xcode. After integration, you can bring up the relevant help document by holding down option and clicking it at the appropriate API Call.</li> <li>It has no special annotation requirements and is highly compatible.</li> </ul> </ul><p><p>To install appledoc, You can use the Brew command directly:</p></p> <table> <tbody> <tr> <td class="gutter"><pre class="line-numbers"><span class="line-number">1</span></pre></td> <td class="code"><pre><code><span class="line">brew install appledoc</span></code></pre></td> </tr> </tbody> </table><p><p>When you switch to the iOS project directory, do the following, Appledoc scans all files under the current path, and then generates a good document to be placed in the doc Directory. You can also use Appledoc-help to view all available Parameters.</p></p> <table> <tbody> <tr> <td class="gutter"><pre class="line-numbers"><span class="line-number">1<span class="line-number">2<span class="line-number">3</span> </span></span></pre></td> <td class="code"><pre><code><span class="line">appledoc -o <output_path> <span class="line">--project-name <project_name> <span class="line">--project-company <project_company> .</span></span></span></code></pre></td> </tr> </tbody> </table><p><p>Detailed usage introduction, Welcome to read my article: "document generation tool using Objective-c: appledoc"</p></p>Xcode Plugin<p><p>Xcode is an integrated development environment for ios, and while Apple has been constantly improving xcode, programmers always have a variety of new ideas and needs that, when Xcode doesn't meet them, will add functionality to Xcode through Plugins. This section will introduce you to some commonly used Xcode enhancement plugins.</p></p><p><p>Xcode all the plugins are installed in the directory <code>~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/</code> , each plugin is a subdirectory, you can also manually switch to this directory to add or remove Plugins.</p></p>Alcatraz<p><p></p></p><p><p>Alcatraz (http://alcatraz.io/) is a plugin that manages all of Xcode's plugins, which can be integrated directly into Xcode's graphical interface, making you feel like you're using Xcode's own Functionality. Alcatraz not only manages Xcode's plugins, It also provides the ability to manage Xcode engineering templates as well as color Configuration.</p></p><p><p>Use the following command line to install Alcatraz:</p></p> <table> <tbody> <tr> <td class="gutter"><pre class="line-numbers"><span class="line-number">1<span class="line-number">2<span class="line-number">3)<span class="line-number">4<span class="line-number">5</span> </span> </span> </span></span></pre></td> <td class="code"><pre><code><span class="line">mkdir -p ~/Library/Application\ Support/<span class="line">Developer/Shared/Xcode/Plug-ins;<span class="line">curl -L http://git.io/lOQWeA |<span class="line"> tar xvz -C ~/Library/Application\ Support/<span class="line"> Developer/Shared/Xcode/Plug-ins</span></span></span></span></span></code></pre></td> </tr> </tbody> </table><p><p>If you restart Xcode after successful installation, you can find Alcatraz in "window" –> "package Manager" in the top menu of Xcode. Click "package Manager" to launch the plugin list page. You can search the plugin in the upper right corner, for the plugin you want to install, click on the icon to the left to download the installation, as shown below, I am installing the kimagenamed plugin:</p></p><p><p></p></p><p><p>Once the installation is complete, click the icon to the left of the plugin again to remove the Plugin.</p></p><p><p>All of the following plug-ins can be installed or deleted by this method, and will not be introduced separately.</p></p><p><p>Alcatraz detailed usage introduction, Welcome to read my article: "use Alcatraz to manage Xcode plugin"</p></p>Ksimagenamed<p><p>Ksimagenamed (https://github.com/ksuther/KSImageNamed-Xcode) is a plug-in that helps you enter a resource name in [UIImage imagenamed:]. When you type <code>[UIImage imageNamed:]</code> , it will automatically pop up the context menu, for you to choose the name of the image resource you need to enter, and in addition to the image resource, you can also preview the resource on the left. As shown in the Following:</p></p><p><p></p></p>Xvim<p><p>Xvim (https://github.com/JugglerShu/XVim) is a xcode vim plugin that lets you turn on Vim mode in the Xcode editing window.</p></p><p><p>The biggest benefit of Vim mode is that you can easily move the cursor and copy and paste the code with full keyboard Operation. Xvim also has a good support for Xcode's column mode, and as with Vim's own column mode, You can use the shortcut keys <code>ctrl + w</code> to toggle the currently edited Column.</p></p>Fuzzyautocompleteplugin<p><p>Fuzzyautocompleteplugin (https://github.com/FuzzyAutocomplete/FuzzyAutocompletePlugin) allows for automatic code completion using a fuzzy Approach.</p></p><p><p>For example, If we are going to overload the <code>viewDidAppear:</code> method, then we have to build the view, did, appear in order to get the corresponding completion information, after using fuzzyautocompleteplugin, we can build the VDA (view, did, appear The first letter of the three words), or any substring that matches the order in which the entire word appears viewdidappear (such as vdapp, adear, etc.), can be matched to the Method.</p></p><p><p></p></p>Xtodo<p><p>Xtodo (https://github.com/trawor/XToDo) is a lookup item in all of the <code>TODO</code> annotations with,,, <code>FIXME</code> <code>???</code> <code>!!!</code> tags.</p></p><p><p>Usually we are in the project development, for a variety of reasons, some things need to be dealt with later, this time to prevent forgetting, plus <code>TODO</code> or comment is very <code>FIXME</code> necessary, but to go online or submit code before the search for these unresolved issues is slightly troublesome. Xtodo can provide a summary of the interface, showing all the unfinished <code>TODO</code> and <code>FIXME</code> Marked.</p></p>Bbudebuggertuckaway<p><p>Bbudebuggertuckaway (https://github.com/neonichu/BBUDebuggerTuckAway) is a very small tool that can automatically hide the debug window at the bottom when you edit the Code. Because normally, debugging is the time to add breakpoints or monitor variable changes, or in the console window <code>po</code> to output some debugging Information. If you start to edit the code, the explanation has been debugging the end, this time to hide the debugging window, you can give the editing interface more space, so that we modify the Code.</p></p>Scxcodeswitchexpander<p><p>Scxcodeswitchexpander (https://github.com/stefanceriu/SCXcodeSwitchExpander) helps you quickly populate the <code>switch</code> statements with each possible value of an enumeration type.</p></p><p><p>For example, when you enter and <code>switch</code> then type a <code>NSTableViewAnimationOptions</code> class, the plug-in complements its possible values after each one <code>case</code> , as shown in:</p></p><p><p></p></p>Deriveddata-exterminator<p><p>Deriveddata-exterminator (https://github.com/kattrali/deriveddata-exterminator) is a plugin that clears the Xcode cache directory.</p></p><p><p>Sometimes Xcode has a variety of strange problems, most often in some complex operations (such as the same project, back and forth to various branch versions), will cause Xcode to display some compile errors or warnings, but eventually can be compiled Through. Novice users are often overwhelmed by this problem, and people familiar with Xcode know that it is often possible to clear the Xcode cache to solve such problems. The plugin adds a clear cache button on the Xcode menu, allowing you to clearly cache content with one CLICK.</p></p>Vvdocumenter<p><p>Vvdocumenter (https://github.com/onevcat/VVDocumenter-Xcode) is a tool that automatically generates code comments that can easily extract the parameter names and return values of a function, in combination with the one described in the previous Section. <code>appledoc</code> command, you can easily export the help Document.</p></p><p><p></p></p>Clangformat<p><p>Clangformat (https://github.com/travisjeffery/ClangFormat-Xcode) is a tool that automatically adjusts code Style. Xcode's own code Indentation auto-tuning feature is weak, especially in JSON format, which often produces very ugly default indentation Effects. Clangformat-xcode can re-typeset the code better, with a built-in layout style and support for custom Styles.</p></p>Colorsense<p><p>Colorsense (https://github.com/omz/ColorSense-for-Xcode) is a <code>UIColor</code> color input helper that helps you to <code>UIColor</code> preview the appropriate color in real time when writing code, as shown in:</p></p><p><p></p></p>Xcodeboost<p><p>Xcodeboost (https://github.com/fortinmike/XcodeBoost) contains several small functions that assist in modifying the code, such as:</p></p> <ul> <ul> <li>You can copy the method implementation in The. m file, and then paste the definition of the method into the corresponding. h file</li> <li>You can enter a regular expression lookup directly in a source file</li> <li>You can copy and paste the code without the automatic indent feature of Xcode (xcode's auto indent often goes wrong, causing the adjusted code to indent because it was tweaked by Xcode when Pasting)</li> </ul> </ul>Summary<p><p>This article is a graphical application tool, command-line tools, Xcode plug-in three parts, the introduction of iOS development of the useful tools. The graphical tools involved are partly charged, and the command line tool and the Xcode plugin tool are all free and open source tools, and I thank the vast majority of open source software authors, who make the entire software ecosystem better.</p></p><p><p>"go" to those handy iOS development tools</p></p></span>

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.