App Programming Guide for iOS翻譯
About iOS App Architecture
譯:關于iOS App架構
Apps need to work with the iOS to ensure that they deliver a great user experience. Beyond just a good design for your app’s design and user interface, a great user experience encompasses many other factors. Users expect iOS apps to be fast and responsive while expecting the app to use as little power as possible. Apps need to support all of the latest iOS devices while still appearing as if the app was tailored for the current device. Implementing all of these behaviors can seem daunting at first but iOS provides the help you need to make it happen.
譯:確保運行在iOS系統(tǒng)上的App能提供給用戶非常好的用戶體驗。不僅僅只為應用程序和UI設計,一個好的用戶體驗包含其他好幾種因素。用戶所期待的iOS App應該是快速響應且消耗更小的電量。App必須支持最新的iOS設備,即使是為現(xiàn)在的設備所定做的。應用程序需要支持所有最新的iOS設備同時出現(xiàn),如果應用程序是針對當前的設備。實現(xiàn)所有這些行為起初似乎令人生畏,但iOS系統(tǒng)提供您所需要的幫助。
This document highlights the core behaviors that make your app work well on iOS. You might not implement every feature described in this document but you should consider these features for every project you create.
譯:本文檔所強調核心行為能讓你的App更好地運行在iOS系統(tǒng)上。你不需要實現(xiàn)所有本文檔描述的行為,但是每一個項目你都應該去考慮這些功能。
Note: Development of iOS apps requires an Intel-based Macintosh computer with the iOS SDK installed. For information about how to get the iOS SDK, go to the iOS Dev Center.
不直譯:iOS App開發(fā)需要一臺IntelCPU的Mac,并且安裝了Xcode。
At a Glance
譯:概覽
When you are ready to take your ideas and turn them into an app, you need to understand the interactions that occur between the system and your app.
譯:當你準備好將你的構想轉化為App時,你需要去了解iOS系統(tǒng)與App之間的相互作用關系。
Apps Are Expected to Support Key Features
譯:App所希望支持的主要特性
The system expects every app to have some specific resources and configuration data, such as an app icon and information about the capabilities of the app. Xcode provides some information with every new project but you must supply resource files and you must make sure the information in your project is correct before submitting your app.
譯:iOS系統(tǒng)預計每個應用都有一些特殊的資源和配置數(shù)據(jù),例如應用程序的圖標和關于app功能信息。Xcode為每一個新的工程配置了一些信息,但在上傳你的app到應用商店之前,你必須提供相關的資源文件和確保你項目中的信息是正確的。
Relevant Chapter: Expected App Behaviors
相關章節(jié):Expected App Behaviors (應用程序行為期望)
Apps Follow Well-Defined Execution Paths
譯:Apps遵循良好的執(zhí)行路徑
From the time the user launches an app to the time it quits, apps follow a well-defined execution path. During the life of an app, it can transition between foreground and background execution, it can be terminated and relaunched, and it can go to sleep temporarily. Each time it transitions to a new state, the expectations for the app change. A foreground app can do almost anything but background apps must do as little as possible. You use the state transitions to adjust your app’s behaviors accordingly.
譯:應用程序App從用戶啟動開始到它終止退出,它遵循了良好的執(zhí)行路徑。在整個應用程序生命周期里,它可以在前臺和后臺之間的相互過渡執(zhí)行,它可以被終止和重新啟動,它可以暫時去休眠。每次過渡到一個新的狀態(tài),應用程序的預計行為會發(fā)生變化。應用程序在前臺時可以做幾乎任何事情但在后臺時必須盡可能少做事情。請您使用這些狀態(tài)過渡相應地調整你的應用程序行為。
Relevant Chapter: The App Life Cycle, Strategies for Handling App State Transitions
相關章節(jié):The App Life Cycle, Strategies for Handling App State Transitions (App生命周期,處理App狀態(tài)過渡的策略)
Apps Must Run Efficiently in a Multitasking Environment
譯:應用程序必須有效地運行在一個多任務環(huán)境中
Battery life is important for users, as is performance, responsiveness, and a great user experience. Minimizing your app’s usage of the battery ensures that the user can run your app all day without having to recharge the device, but launching and being ready to run quickly are also important. The iOS multitasking implementation offers good battery life without sacrificing the responsiveness and user experience that users expect, but the implementation requires apps to adopt system-provided behaviors.
譯:電池壽命對于用戶來說是很重要的,關乎到性能、響應性、好的用戶體驗。讓你的app電量消耗最小化確保用戶可以整天使用您的應用程序一整天而無需充電,但迅速啟動和運行速度也很重要。iOS系統(tǒng)多任務的實現(xiàn)提供了良好的電池壽命且不犧牲用戶所期望的響應性和用戶體驗,但是想要實現(xiàn)這些效果,要求應用程序采用系統(tǒng)提供的行為。
Relevant Chapters: Background Execution, Strategies for Handling App State Transitions
相關章節(jié):Background Execution, Strategies for Handling App State Transitions (后臺執(zhí)行,處理App狀態(tài)過渡的策略)
Communication Between Apps Follows Specific Pathways
譯:App間通訊必須通過特殊通道
For security, iOS apps run in a sandbox and have limited interactions with other apps. When you want to communicate with other apps on the system, there are specific ways to do so.
譯:為了安全,iOS應用程序運行在沙箱里,并提供有限的與其他應用程序交互方式。當你想要與系統(tǒng)上其他應用程序通信,有特定的方式去訪問。
Relevant Chapter: Inter-App Communication
相關章節(jié):Inter-App Communication (App之間相互通訊)
Performance Tuning is Important for Apps
譯:性能優(yōu)化App重要性
Every task performed by an app has a power cost associated with it. Apps that drain the user’s battery create a negative user experience and are more likely to be deleted than those that appear to run for days on a single charge. So be aware of the cost of different operations and take advantage of power-saving measures offered by the system.
譯:每一個由應用程序處理的任務都會有電量消耗。App消耗電池電量都會給用戶體驗性造成負面的影響,比起那些能夠運行好幾天才充一次電的應用,它更容易給用戶刪除掉。所以要充分意識到不同操作的耗電量和充分利用系統(tǒng)提供的省電措施。
Relevant Chapter: Performance Tips
相關章節(jié):Performance Tips (性能優(yōu)化技巧)
How to Use This Document
譯:如何使用本文檔
This document is not a beginner’s guide to creating iOS apps. It is for developers who are ready to polish their app before putting it in the App Store. Use this document as a guide to understanding how your app interacts with the system and what it must do to make those interactions happen smoothly.
譯:這個文檔不是一個初學者創(chuàng)建iOS應用程序指南。這是為開發(fā)人員上傳App到app Store之前的一系列改進。使用本文檔作為了解應用程序與系統(tǒng)相互作用的指南,它指出了必須做些什么來實現(xiàn)這些交互更加順暢。
Prerequisites
譯:預備知識
This document provides detailed information about iOS app architecture and shows you how to implement many app-level features. This book assumes that you have already installed the iOS SDK, configured your development environment, and understand the basics of creating and implementing an app in Xcode.
譯:本文檔提供了iOS應用程序體系結構詳細信息和向您展示如何實現(xiàn)應用程序水平的特性。這本書假設您已經(jīng)安裝了iOS SDK,配置開發(fā)環(huán)境,懂得在Xcode中基本創(chuàng)建和實現(xiàn)一個應用程序。
If you are new to iOS app development, read Start Developing iOS Apps (Swift). That document offers a step-by-step introduction to the development process to help you get up to speed quickly. It also includes a hands-on tutorial that walks you through the app-creation process from start to finish, showing you how to create a simple app and get it running quickly.
譯:如果你是iOS應用程序開發(fā)者新手,請閱讀Start Developing iOS Apps (Swift)。該文檔提供了一個循序漸進的開發(fā)過程介紹來幫助你迅速成長,它還包括一個從頭到尾創(chuàng)建一個app實踐教程展示如何創(chuàng)建一個簡單的App和讓它快速運行。
See Also
譯:閱讀推薦
If you are learning about iOS, read iOS Technology Overview to learn about the technologies and features you can incorporate into your iOS apps.
譯:如果你正在學習iOS開發(fā),請閱讀iOS Technology Overview文檔,學習iOS相關技術和功能并添加到你的iOS應用程序中。