The path to iOS architects: my point-and-point understanding of iOS architecture (outline)

Source: Internet
Author: User
<span id="Label3"></p><span style="font-size:18px; color:#cc33cc"><span style="font-size:18px; color:#cc33cc">1, Today I summon up the courage, want to record their iOS architecture learning and growth of the little Bit. </span></span><p><p><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>iOS development also has a few years, from the beginning of the main language, interface, logic, and then to the back of the complex point of the thread, data processing, network requests, animation, and finally to the most complex underlying audio and video, image algorithms, their own definition of various effects, the network underlying PROCESSING. Even the final performance: neon, ASM Optimization.</span></p></p><p><p>Feel yourself in the development of ios, every time is mirrors, obviously very close to the truth but always can not touch. Lack of a global sense of control over Ios. So I decided to take a look at some of the official iOS documents and see what the hierarchy of iOS modules is all About.</p></p><p><p><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>I've been doing this since about a year ago, and I know it's definitely not a easy thing to do. Just like the Android architect, read through the source code, it must be very hard. Because of what I did when I was studying. DSP signal processing (low-level driver. Algorithm migration).</span></p></p><p><p>So I was very angry with myself before I started. I think both iOS and Android are embedded Devices. Since once is to do the lowest level, now look at the upper layer should span is not big, hehe.</p></p><p><p>But when I really do it, I find Out. It's a lot of Work. So the plan was finally tweaked to do a thorough study of only the three hardest parts of ios.</p></p><p><p><span style="font-size:18px"><span style="white-space:pre"></span><span style="color:#339999"><span style="white-space:pre"></span>Of course because of the time Rush. In addition to their own level of limited, there is unclear or not in place, but also hope that we criticize correct!</span></span></p></p><p><p>Do not shoot bricks ha ha!</p></p><p><p></p></p><span style="color:rgb(204,51,204); font-size:18px"><span style="color:rgb(204,51,204); font-size:18px">2, three iOS columns: audio and video, image core animation, network processing</span></span><p><p><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>The importance of these three I will not say, the general ClientApp may not be in-depth attention to This. But just want to do something with characteristics, do in-depth, do Exquisite. I think these three parts have to be contacted Frequently.</span></p></p><p><p><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>The following is an online iOS system architecture diagram, The picture is very good I just took it directly. Oh</span></p></p><p style="text-align:center"><p style="text-align:center"><span style="font-size:18px"><br></span></p></p><p><p><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>Usage frequency:</span></p></p><p><p><span style="font-size:18px"><span style="white-space:pre"></span>Red part: often used <span style="color:#ff6666"> <span style="white-space:pre"></span> </span></span></p></p><p><p><span style="font-size:18px"><span style="white-space:pre"></span>Yellow part: use general <span style="color:#cc9933"> <span style="white-space:pre"></span> </span></span></p></p><p><p><span style="font-size:18px"><span style="white-space:pre"></span>Light green part: Occasional use <span style="color:#339999"> <span style="white-space:pre"></span> </span></span></p></p><p><p><span style="font-size:18px"><span style="white-space:pre"></span>Green section: very little use <span style="color:#006600"> <span style="white-space:pre"></span> </span></span></p></p><p><p><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>But I want to learn from the difficulty degree. And the importance of using these techniques to Divide.</span></p></p><p><p>So I focused on the contents of the <span style="color:#3333ff">pink box</span> .</p></p><span style="font-size:18px; color:#cc33cc"><span style="font-size:18px; color:#cc33cc">3 Ios:audio&video&ffmpeg</span></span><p><p><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>Let's take a look at a few structure diagrams: multimedia layer structure diagram:</span></p></p><p style="text-align:center"><p style="text-align:center"><span style="font-size:18px"><span style="white-space:pre"></span></span></p></p><p><p><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>Audio processing Structure diagram:</span></p></p><p><p><span style="font-size:18px"><span style="white-space:pre"></span></span></p></p><p style="text-align:center"><p style="text-align:center"><span style="font-size:18px"><span style="white-space:pre"></span></span></p></p><p><p>Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "width=" 564 "height=" 223 "></p></p><p><p><br></p></p><p><p><span style="white-space:pre"></span><span style="font-size:18px"><span style="white-space:pre"></span>The more you go to the top, the more unique the functional package, and the less functionality we can customize at the same time.</span></p></p><p><p>For example, in AudioUnit we are able to control the size of the hardware buffer, can be decoded audio data: voice changer, mixing, encryption, waveform display, do a variety of effects we want, but the top there is no such rich api.</p></p><p><p><span style="white-space:pre"></span><span style="font-size:18px"><span style="white-space:pre"></span>Each part of the specific function and use will be in the blog special introduction, here is not verbose.</span></p></p><p><p></p></p><p><p><span style="font-size:18px">besides, I'm going to do it. ffmpeg decoding is also put into this Section. The initial idea is this:</span></p></p><p><p><span style="white-space:pre"></span><span style="font-size:18px; color:#cc33cc"><span style="white-space:pre"></span>iOS native Api:</span></p></p><p><p><span style="font-size:18px"><span style="white-space:pre"></span><span style="color:#3366ff"><span style="white-space:pre"></span>3.1 avfoundation self-defined av frequency playback</span></span></p></p><p><p><span style="font-size:18px; color:#3366ff"><span style="white-space:pre"><span style="font-size:18px"><span style="white-space:pre"></span>3.2 OpenAL Play 3D Sound</span></span></span></p></p><p><p><span style="font-size:18px; color:#3366ff"><span style="white-space:pre"><span style="font-size:18px"><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>3.3 Audio Queue Principle Analysis</span></span></span></span></p></p><p><p><span style="font-size:18px; white-space:pre; color:rgb(51,102,255)">Understanding and use of 3.4 audiounit</span></p></p><p><p><span style="font-size:18px; white-space:pre; color:rgb(51,102,255)">3.5 Camera from recording to playback process parsing</span></p></p><p><p><span style="font-size:18px; color:rgb(51,102,255)"><span style="white-space:pre"><span style="font-size:18px"><span style="font-size:18px"><span style="font-size:18px"><span style="white-space:pre"><span style="font-size:18px"></span><span style="color:rgb(204,51,204); font-size:18px"><span style="white-space:pre"></span>IOS Streaming media soft codec and frequently used Technology:</span></span></span></span></span></span></span></p></p><p><p><span style="font-size:18px; color:#3366ff"><span style="white-space:pre"><span style="font-size:18px"><span style="font-size:18px"><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>3.6 MPEG-4|AAC Video Player</span></span></span></span></span></p></p><p><p><span style="font-size:18px; color:#3366ff"><span style="white-space:pre"><span style="font-size:18px"><span style="font-size:18px"><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>3.7 FFmpeg parsing for IOS (possible 2-4 articles)</span></span></span></span></span></p></p><p><p><span style="font-size:18px; color:#3366ff"><span style="white-space:pre"><span style="font-size:18px"><span style="font-size:18px"><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>3.8 rtsp streaming media with HLS streaming for IOS</span></span></span></span></span></p></p><p><p><span style="font-size:18px; color:#3366ff"><span style="white-space:pre"><span style="font-size:18px"><span style="font-size:18px"><span style="font-size:18px"><br></span></span></span></span></span></p></p><p><p><span style="font-size:18px; color:#3366ff"><span style="white-space:pre"><span style="font-size:18px"><span style="font-size:18px"><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>3.9 Image Synthesis video, audio mixing principle analysis</span></span></span></span></span></p></p><p><p><span style="font-size:18px; color:#3366ff"><span style="white-space:pre"><span style="font-size:18px"><span style="font-size:18px"><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>3.10 Real-time Filter effects processing</span></span></span></span></span></p></p><p><p><span style="font-size:18px; color:#3366ff"><span style="white-space:pre"><span style="font-size:18px"><span style="font-size:18px"><span style="font-size:18px"><span style="color:rgb(204,51,204); font-size:18px; white-space:pre"><span style="white-space:pre"></span>iOS hard-coded decoding:</span><br></span></span></span></span></span></p></p><p><p><span style="font-size:18px; color:#3366ff"><span style="white-space:pre"><span style="font-size:18px"><span style="font-size:18px"><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>3.11 Wav|mp4 file Format parsing</span></span></span></span></span></p></p><p><p><span style="font-size:18px; color:#3366ff"><span style="white-space:pre"><span style="font-size:18px"><span style="font-size:18px"><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>3.12 H264 decoding fundamentals and support for iOS</span></span></span></span></span></p></p><p><p><span style="font-size:18px; color:#3366ff"><span style="white-space:pre"><span style="font-size:18px"><span style="font-size:18px"><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>3.13 on iOS hard-coding hard solution</span></span></span></span></span></p></p><p><p><span style="white-space:pre"></span><span style="font-size:18px"><span style="white-space:pre"></span>may not be very comprehensive, wait for me to tidy up the information before continuing to Join.</span></p></p><p><p></p></p><span style="font-size:18px; color:#cc33cc"><span style="font-size:18px; color:#cc33cc">4 image&animation</span></span><p><p><span style="white-space:pre"></span><span style="font-size:18px"><span style="white-space:pre"></span>Picture animation processing Section:</span><span style="white-space:pre"></span></p></p><p style="text-align:center"><p style="text-align:center"><span style="white-space:pre"></span></p></p><p><p>Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "width=" 590 "height=" 431 "></p></p><p><p><span style="font-size:18px; color:rgb(54,46,43); font-family:Arial; line-height:26px"><span style="white-space:pre"></span><span style="white-space:pre"></span>Quartzcore.framework: mainly includes core Animation, Calayer is also below this Framework.</span></p></p><p><p></p></p><p><p></p></p><p style="color:rgb(54,46,43); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(54,46,43); font-family:Arial; font-size:14px; line-height:26px"><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>Coregraphsic.framework: mainly includes Cgcontext class, quartz2d is a drawing engine. A set of APIs is provided by Coregraphsic.</span></p></p><p><p></p></p><p style="color:rgb(54,46,43); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(54,46,43); font-family:Arial; font-size:14px; line-height:26px"><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>Opengles: This even a framework is the name of the 3D drawing Engine.</span></p></p><p><p>Mainly used for 3D drawing.</p></p><p><p>and efficient texture Mapping.</p></p><p style="color:rgb(54,46,43); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(54,46,43); font-family:Arial; font-size:14px; line-height:26px"><span style="font-size:18px"><span style="white-space:pre"></span><span style="white-space:pre"></span>Coreimage: it provides a wealth of image processing, filter library. At the same time there are GPU acceleration features.</span></p></p><p><p></p></p><span style="font-size:18px"><span style="font-size:18px">This link I would like to elaborate from the following sections: <span style="white-space:pre"></span> <span style="white-space:pre"></span> </span></span><p><p><span style="font-size:18px"><span style="color:#3366ff">4.1 <span style="white-space:pre"> <span style="font-family:Arial; font-size:18px; line-height:26px">Quartzcore introduces a variety of cool animations: such as the Pnchart chart refactoring GitHub (4-5 possible articles)</span></span></span></span></p></p><p><p><span style="font-size:18px"><span style="white-space:pre"><span style="font-family:Arial; font-size:18px; line-height:26px"><span style="color:#3366ff"><span style="white-space:pre"></span><span style="white-space:pre"></span><span style="font-family:Arial; font-size:18px; line-height:26px">Use of 4.2 quartz2d drawing engine</span></span></span></span></span></p></p><p><p><span style="font-size:18px"><span style="white-space:pre"><span style="font-family:Arial; font-size:18px; line-height:26px"><span style="font-family:Arial; font-size:18px; line-height:26px"><span style="color:#3366ff"><span style="white-space:pre"></span><span style="white-space:pre"></span>Use of 4.3 opengles drawing engine</span></span></span></span></span></p></p><p><p><span style="font-size:18px"><span style="white-space:pre"><span style="font-family:Arial; font-size:18px; line-height:26px"><span style="font-family:Arial; font-size:18px; line-height:26px"><span style="color:#3366ff"><span style="white-space:pre"></span>4.4 iOS Native Filter Gallery Introduction</span></span></span></span></span></p></p><p><p><span style="font-size:18px"><span style="white-space:pre"><span style="font-family:Arial; font-size:18px; line-height:26px"><span style="font-family:Arial; font-size:18px; line-height:26px"><span style="color:rgb(51,102,255); white-space:pre"></span><span style="color:#cc33cc">4.5 ARMv7 Core (register Use)</span></span></span></span></span></p></p><p><p><span style="font-size:18px"><span style="white-space:pre"><span style="font-family:Arial; font-size:18px; line-height:26px"><span style="font-family:Arial; font-size:18px; line-height:26px"><span style="color:rgb(51,102,255); white-space:pre"></span><span style="color:#009900">4.6 Neon, ASM (assembly Optimization)</span></span></span></span></span></p></p><p><p><span style="white-space:pre"></span></p></p><p><p></p></p><span style="font-size:18px; color:rgb(204,51,204)"><span style="font-size:18px; color:rgb(204,51,204)">5 NetWork</span></span><span style="white-space:pre"><span style="white-space:pre"></span></span><span><span></span></span><p><p></p></p><p><p></p></p><p style="font-size:14px; line-height:26px; margin-top:0px; margin-bottom:7.5px; text-align:justify; font-family:Verdana; color:rgb(75,75,75)"><p style="font-size:14px; line-height:26px; margin-top:0px; margin-bottom:7.5px; text-align:justify; font-family:Verdana; color:rgb(75,75,75)"><span style="letter-spacing:0px"><span style="font-size:18px"><span style="white-space:pre"></span>The network hierarchy of iOS is mainly divided into the following three sections:</span></span></p></p><p style="font-size:14px; line-height:26px; margin-top:0px; margin-bottom:7.5px; text-align:justify; font-family:Verdana; color:rgb(75,75,75)"><p style="font-size:14px; line-height:26px; margin-top:0px; margin-bottom:7.5px; text-align:justify; font-family:Verdana; color:rgb(75,75,75)"><span style="letter-spacing:0px"><span style="font-size:18px"><span style="white-space:pre"></span>Cocoa layer: nsurl (more often used), nsstream, gamekit, WebKit, asihttprequest (third-party framework)</span></span></p></p><p style="font-size:14px; line-height:26px; margin-top:0px; margin-bottom:7.5px; text-align:justify; font-family:Verdana; color:rgb(75,75,75)"><p style="font-size:14px; line-height:26px; margin-top:0px; margin-bottom:7.5px; text-align:justify; font-family:Verdana; color:rgb(75,75,75)"><span style="letter-spacing:0px"><span style="font-size:18px"><span style="white-space:pre"></span>Core foundation:cfnetwork/cfnetservices, cfstream, Cfsocket</span></span></p></p><p style="font-size:14px; line-height:26px; margin-top:0px; margin-bottom:7.5px; text-align:justify; font-family:Verdana; color:rgb(75,75,75)"><p style="font-size:14px; line-height:26px; margin-top:0px; margin-bottom:7.5px; text-align:justify; font-family:Verdana; color:rgb(75,75,75)"><span style="letter-spacing:0px"><span style="font-size:18px"><span style="white-space:pre"></span>Os:bsd Socket</span></span></p></p><span style="white-space:pre"><span style="white-space:pre"></span></span><span style="font-size:18px"><span style="font-size:18px">This section is for example the following arrangement:</span></span><p><p><span style="color:#3366ff"><span style="white-space:pre"></span><span style="font-size:18px">5.1 socket (from OS layer to cocoa layer) socket comprehension under different circumstances (estimated 4)</span></span></p></p><p><p><span style="font-size:18px; color:#3366ff">5.2 Using the socket to implement the HTTP protocol (estimated about 5 articles)</span></p></p><p><p><span style="font-size:18px; color:#3366ff">5.3 Ios's understanding of proxies, off-line caching, CDN Acceleration (estimated 6 articles or So)</span></p></p><p><p><span style="font-size:18px"></span></p></p><p><p><span style="font-size:18px"><br></span></p></p> <p><p>The path to iOS architects: my point-and-point understanding of iOS architecture (outline)</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.