博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
About Your Third iOS App
阅读量:6208 次
发布时间:2019-06-21

本文共 5690 字,大约阅读时间需要 18 分钟。

About Your Third iOS App

 

你的第三个 iOS应用,向你介绍 iCloud文件存储 API。在一个用户的 iCloud 存储中,你会使用这些 API来存储和操作文件。Your Third iOS App introduces you to the iCloud document storage APIs. You use these APIs to store and manipulate files in a user’s iCloud storage.

在这个指导中,你会创建一个应用,创建和管理一个用户 iCloud 存储中的文本文件。这个应用视图作为一个初级读本,教会你基本的 iCloud 概念,并且给你一些创建一个简单 iCloud 应用的经验的帮助。During this tutorial, you will build an app that creates and manages text files in a user’s iCloud storage. This app is intended as a primer to teach you the basic iCloud concepts and to give you some hands on experience creating a simple iCloud app.

要想从本指导中获益,通常你必须已经有一些计算机编程基础方面的熟悉,并且特别是使用 OC 语言。这个指导没有描述更多应用设计的基本方面,为了聚焦到 iCloud集成。这样,你应该通过应用-相关的指导,为了开发一个应用程序创建过程的基础解释。To benefit from this tutorial, you must already have some familiarity with the basics of computer programming in general and with the Objective-C language in particular. This tutorial does not describe the more basic aspects of app design in order to focus on iCloud integration. Therefore, you should go through the app-related tutorials in order to develop a basic understanding of the app creation process.

 

预览At a Glance

你的第三个应用创建在第一个和第二个应用知识的基础上,这两个应用展示了你是如何在 iCloud 中存储文件的合并支持。Your Third iOS App builds on the knowledge you gained in Your First iOS App and Your Second iOS App: Storyboards to show you how to incorporate support for storing documents in iCloud.

 

配置项目使用 iCloudConfiguring Your Project to Use iCloud

用 iCloud 的应用必须签上特定津贴,确保它们可以访问用户 iCloud 账号的文件存储空间。要建立这些权利,在 Xcode.app 和 iOS 会员中心中修改你的项目的配置和执行几个步骤。虽然你之后可以在你的开发周期中做一些配置,这个指导会首先解决这些问题,这样你可以放心,你的应用之后可以正确运行。Apps that use iCloud must be signed with special entitlements that grant them access to the document storage space in a user’s iCloud account. To set up these entitlements, you modify your project’s configuration and perform several steps in Xcode and the iOS Member Center. Although you can do some of this configuration later in your development cycle, this tutorial addresses these issues first so that you can be assured that your project works correctly later.

相关章节:“开始开发”Relevant chapters: “Getting Started”

 

 

使用文件对象管理你的文件Managing Your Files Using Document Objects

文件对象是在你的用户 iCloud 账号的存储中最早管理文件的方式。每个文件对象管理一个你应用数据的离散部分,并且负责撰文数据到磁盘,并读取数据,在适当的时间备份到内存。所有的数据整合发生在你定义的文档类的接口中。Document objects are the easiest way to manage files in you store in a user’s iCloud account. Each document object manages a discrete portion of your app’s data and is responsible for writing that data to disk and reading it back into memory at appropriate times. All interactions with that data occur through the interfaces of the document class you define.

相关章节:“定义你的文档子类”Relevant chapters: “Defining Your Document Subclass”

 

 

创建应用的用户接口Building the App’s User Interface

虽然 iCloud 最初管理你的应用数据,你的应用任然需要一个用户接口来存储数据。这个指导用两个视图控制器来表现它的内容。第一个展示可用文件列表,管理创建和删除这些文档。第二个展示文件的内容,允许你编辑这些内容。Although iCloud primarily manages your app’s data, your app still needs a user interface to present that data. This tutorial uses two view controllers to present its content. The first displays the list of available documents and manages the creation and deletion of those documents. The second displays the contents of a document and allows you to edit those contents.

相关章节:“完成主视图控制器”“完成描述视图控制器”Relevant chapters: “Implementing the Master View Controller,” “Implementing the Detail View Controller”

 

 

在 iCloud 中查找存在的文档Searching for Existing Documents in iCloud

在 iCloud 中查找需要的文件,因为即使你的应用没有运行,文档列表可以改变。文档可以在不同的设备上创建,用户可以删除不需要的文档。你的应用使用一个元数据查询对象来查找文档,检测文档列表的改变。Searching for documents in iCloud is necessary because the list of documents can change while your app is not running. Documents can be created on different devices and the user can delete documents that are no longer needed. Your app uses a metadata query object to search for documents and detect changes to the document list.

相关章节“查找 iCloud 文档”Relevant chapters: “Searching for iCloud Documents”

 

 

解决问题,选择你的下一步Solving Problems and Choosing Your Next Steps

当你完成指导中的任务,你可能遇到不能解决的问题。有一些共同的错误你可以比照,包括代码列表,你可以对比你项目中的代码。As you complete the tasks in this tutorial, you might encounter problems that you do not know how to solve. There are a few common errors that you can look for and it includes code listings that you can compare against the code in your project.

完成指导后,你应该考虑如何提高你的应用,增加你的知识。After you finish this tutorial, you should think about ways to improve your app and increase your knowledge.

相关章节:“问题处理”“下一步”“代码列表”Relevant chapters: “Troubleshooting,” “Next Steps,” “Code Listings”

 

 

先决条件Prerequisites

下边的指导介绍最好的创建所有应用的练习,在此之前应该先看的:The following tutorials introduce best practices for creating all apps and should be read before this tutorial:

  • Your First iOS App

  • Your Second iOS App: Storyboards

也可查看See Also

这个指导演示应用发展的一个方面,即采用 iCloud 在你的应用数据模型和控制器层。关于其他关键层方面的应用发展的信息,查看一下文档:This tutorial demonstrates only one aspect of app development, namely the adoption of iCloud in your app’s data model and controller layers. For information about other key aspects of app development, see the following documents:

  • 学习推荐方法到设计的用户接口和一个 iOS 应用的用户扩展,查看 iOS 人工接口指导。To learn about the recommended approaches to designing the user interface and user experience of an iOS app, see iOS Human Interface Guidelines.

  • 为全面指导创建一个功能齐全的iOS应用程序, 查看 iOS应用编程指导。For comprehensive guidance on creating a full-featured iOS app, see iOS App Programming Guide.

  • 为更多关于创建一个基于文件的应用的详细信息,查看基于文件的应用编程指导。For more detailed information about creating a document-based app, see Document-Based App Programming Guide for iOS.

  • 学习所有你需要执行的任务,作为你提交应用程序到应用存储的准备,查看应用分布指导。To learn about all the tasks you need to perform as you prepare to submit your app to the App Store, see .

转载于:https://www.cnblogs.com/zyingn/articles/iOS_translation9.html

你可能感兴趣的文章
自适应滤波:矩阵求逆
查看>>
SVN--从本地检出项目至服务器报错--禁止访问
查看>>
[LeetCode] Remove Invalid Parentheses
查看>>
3年外包码农近期烦心事
查看>>
如何用Fritzing实现元器件自定义接线图
查看>>
Educational Codeforces Round 37-E.Connected Components?题解
查看>>
4.13.2
查看>>
移动端图片处理
查看>>
使用FIDDER 抓包构建请求
查看>>
Linux误删文件挽救
查看>>
MongoDB整理笔记の体系架构
查看>>
HTML5 Web 客户端五种离线存储方式汇总
查看>>
石子博弈
查看>>
select Option(增加,删除,清空)
查看>>
centos7 mysql数据库的安装与使用
查看>>
四: 使用vue搭建网站前端页面
查看>>
四:DRF项目开发的准备
查看>>
Linux 进程管理
查看>>
【和孩子一起学编程】 python笔记--第五天
查看>>
java处理高并发高负载类网站的优化方法
查看>>