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.
- /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:
- % cd MyProj %
- scan-build xcodebuild
You can also use the following parameters:
- % scan-build -o ./check
- --view xcodebuild
- -configuration Development : *
- * BUILD SUCCEEDED *
- * scan-build: 1 bugs found.
- 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.
- 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
- { -d | --data
- }
- data_format[@sample_rate_hz]
- [/format_flags]
- [#frames_per_packet] : [-][BE|LE]{F|[U]I}{8|16|24|32|64}
- (PCM) e.g. BEI16 F32@44100 or a data format appropriate to file format
The following formats can be specified for. WAV files:
- UI8 LEI16 LEI24 LEI32 LEF32
- 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:
- $afconvert -f WAVE -d LEI16@22050 -c
- destinate file >
For example, to change the. wav file format in the current directory and subdirectory, run the following command:
- $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:
- $find . -name '*.wav' -exec afconvert -f caff -d ima4 {} /;
The supported formats are as follows:
- { -f | --file } file_format: ....... 'caff' = Apple CAF (.caf)
- data_formats: '.mp1' '.mp2' '.mp3' 'MAC3' 'MAC6' 'QDM2' 'QDMC' 'Qclp' 'Qclq' 'aac ' 'aacl' '
- 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!