IPhone development tools and applications (Part II)

Source: Internet
Author: User

IPhone development toolsIntroduction and application are the content to be introduced in this article, which can be introduced by friends in the upper and lower sections. Continue to the introduction of iPhone development tools and applications. Let's take a look at the details of this article.

Accessorizer Automatic Code Generation Tool for iPhone development tools

AccessorizerIt is an automated code tool that can automatically generate finalized Code such as property and Keyed Archiving for you, saving a lot of time for development,

For more information, see the video demonstration on the author's website. Here we only introduce some basic usage methods.

First, set your own encoding Style

Start Accessorizer

Double-click @ interface braces in Xcode and select an instance.

Press Cmd + 1

Accessorizer is automatically displayed. Click Cmd + TAB to return to Xcode.

The Code has been automatically copied to the clipboard and pasted to a suitable place.

Clang static parsing Objective-C program used by iPhone development tools

This section introduces clang, a tool for static parsing programs.

Clang is one of LLVM compiler projects. LLVM supports the C/C ++/Objective-C language, and many Apple engineers have joined the project.

Static parser

Static parsing means analyzing errors and predicting problems from the code structure of the program instead of executing the program. Such as FindBugs in Java and prefast in C ++. These tools can reduce the number of errors in the program to a certain extent.

For static parsing, analyze the following problems:

Code Format, whether the name is illegal

Warning error-prone code

Warning code that may cause problems when running the program

For example, code that is prone to memory leakage will be detected and you will be prompted to correct it.

Use clang to parse iPhone programs

Install

Download clang, decompress and copy all directories/files to the following directory, and set the directory to PATH.

 
 
  1. /usr/local/bin 

The following are some basic commands.

Scan-build commands used for parsing

Ccc-analyzer gcc instance

Clang is executed during parsing and can also be used as a compiler.

The expression of the sortedtable. js parsing report uses JavaScript code.

The usage is simple, for example:

 
 
  1. % cd MyProj %   
  2. scan-build xcodebuild 

You can also use the following parameters:

 
 
  1. % scan-build -o ./check   
  2. --view xcodebuild   
  3. -configuration Development : *  
  4. * BUILD SUCCEEDED *  
  5. * scan-build: 1 bugs found.  
  6. Viewing analysis results: './check/2010-04-11-2/index.html' 

"-O" specifies the location of the output report. The default value is/tmp. "-view" indicates that the report is opened in the browser after resolution. The parameters of the compiler xcodebuild remain unchanged.

Shows the report results:

After each resolution, you are advised to use the following command to delete the compilation result. Otherwise, problems may occur.

 
 
  1. xcodebuild clean 

If it is a new version of Xcode, clang has been integrated into Xcode, you can use build --> in the project settings to execute static parsing to automatically complete the parsing process.

Converting WAV Files Using Afconvert in iPhone development tools

The. WAV audio file is often used in the program. Although it can be used directly, it is best to convert it to The. CAF format recommended by apple.

In this case, we can use the afconvert command. The basic syntax is as follows:

Use-d to specify the frequency format

 
 
  1. { -d | --data   
  2.    }   
  3. data_format[@sample_rate_hz]  
  4. [/format_flags]  
  5. [#frames_per_packet] : [-][BE|LE]{F|[U]I}{8|16|24|32|64}   
  6. (PCM) e.g. BEI16 F32@44100 or a data format appropriate to file format 

The following formats can be specified for. WAV files:

 
 
  1. UI8 LEI16 LEI24 LEI32 LEF32
  2. For example,-d LEI16 @ 22050 represents 16-bit 22050Hz.

You can also use-c to specify a sound channel. Use-f to specify the format. For example:

 
 
  1. $afconvert -f WAVE -d LEI16@22050 -c   
  2.  destinate file > 

For example, to change the. wav file format in the current directory and subdirectory, run the following command:

 
 
  1. $find . -name '*.wav' -exec afconvert -f WAVE -d LEI16@22050 -c 1 {} /;  

If you want to convert to a. caf file compressed with ima4, run the following command:

 
 
  1. $find . -name '*.wav' -exec afconvert -f caff -d ima4 {} /;  

The supported formats are as follows:

 
 
  1.  { -f | --file } file_format: ....... 'caff' = Apple CAF (.caf)   
  2. data_formats: '.mp1' '.mp2' '.mp3' 'MAC3' 'MAC6' 'QDM2' 'QDMC' 'Qclp' 'Qclq' 'aac ' 'aacl' '  
  3. agsm' 'alac' 'alaw' 'drms' 'dvca' 'dvi ' 'dvi8' 'ilbc' 'ima4' 'lpc ' I8 BEI16 BEI24 BEI32 BEF32 BEF64  

Summary:IPhone development toolsI hope this article will help you with the introduction and application content!

Related Article

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.