没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
iOS Development Guide
Tools & Languages: IDEs
2010-11-15
Apple Inc.
© 2010 Apple Inc.
All rights reserved.
No part of this publication may be reproduced,
stored in a retrieval system, or transmitted, in
any form or by any means, mechanical,
electronic, photocopying, recording, or
otherwise, without prior written permission of
Apple Inc., with the following exceptions: Any
person is hereby authorized to store
documentation on a single computer for
personal use only and to print copies of
documentation for personal use provided that
the documentation contains Apple’s copyright
notice.
The Apple logo is a trademark of Apple Inc.
Use of the “keyboard” Apple logo
(Option-Shift-K) for commercial purposes
without the prior written consent of Apple may
constitute trademark infringement and unfair
competition in violation of federal and state
laws.
No licenses, express or implied, are granted
with respect to any of the technology described
in this document. Apple retains all intellectual
property rights associated with the technology
described in this document. This document is
intended to assist application developers to
develop applications only for Apple-labeled
computers.
Every effort has been made to ensure that the
information in this document is accurate. Apple
is not responsible for typographical errors.
Apple Inc.
1 Infinite Loop
Cupertino, CA 95014
408-996-1010
App Store is a service mark of Apple Inc.
Apple, the Apple logo, Cocoa, Cocoa Touch,
Dashcode, Finder, Instruments, iPhone, iPhoto,
iPod, iPod touch, iTunes, Keychain, Logic, Mac,
Mac OS, Objective-C, Safari, Shake, Spotlight,
and Xcode are trademarks of Apple Inc.,
registered in the United States and other
countries.
iPad is a trademark of Apple Inc.
IOS is a trademark or registered trademark of
Cisco in the U.S. and other countries and is used
under license.
Intel and Intel Core are registered trademarks
of Intel Corportation or its subsidiaries in the
United States and other countries.
Java is a registered trademark of Oracle and/or
its affiliates.
OpenGL is a registered trademark of Silicon
Graphics, Inc.
Simultaneously published in the United States
and Canada.
Even though Apple has reviewed this document,
APPLE MAKES NO WARRANTY OR REPRESENTATION,
EITHER EXPRESS OR IMPLIED, WITH RESPECT TO
THIS DOCUMENT, ITS QUALITY, ACCURACY,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR
PURPOSE. AS A RESULT, THIS DOCUMENT IS
PROVIDED “AS IS,” AND YOU, THE READER, ARE
ASSUMING THE ENTIRE RISK AS TO ITS QUALITY
AND ACCURACY.
IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT,
INDIRECT, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES RESULTING FROM ANY
DEFECT OR INACCURACY IN THIS DOCUMENT, even
if advised of the possibility of such damages.
THE WARRANTY AND REMEDIES SET FORTH ABOVE
ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL
OR WRITTEN, EXPRESS OR IMPLIED. No Apple
dealer, agent, or employee is authorized to make
any modification, extension, or addition to this
warranty.
Some states do not allow the exclusion or limitation
of implied warranties or liability for incidental or
consequential damages, so the above limitation or
exclusion may not apply to you. This warranty gives
you specific legal rights, and you may also have
other rights which vary from state to state.
Contents
Introduction
Introduction 9
Organization of This Document 9
Installing the iOS SDK 10
See Also 10
Chapter 1
iOS Development Quick Start 11
Essential Development Tasks 11
Creating an iOS Application Project 12
Editing Code 13
Using Code Completion 14
Accessing Documentation 15
Building and Running Your Application 16
Measuring Application Performance 17
Further Exploration 17
Tutorial: Hello, World! 17
Create the Project 17
Write the Code 20
Run the Application 22
Further Exploration 23
Chapter 2
Configuring Applications 25
Editing Property-List Files 25
Managing Application Entitlements 27
Conditionalizing Compilation and Linking 29
Compiling Source Code Conditionally for iOS Applications 29
Linking Frameworks Conditionally for iOS Applications 29
Upgrading a Target from iPhone to iPad 30
Chapter 3
Building and Running Applications 31
Running Sample Applications 31
The Build-and-Run Workflow 32
Specifying the Buildtime Environment 32
Specifying the Runtime Environment 36
Specifying Where to Place Your Application 37
Building Your Application 37
Running Your Application 39
Streamlining the Build-and-Run Workflow 39
Managing Application Data 39
3
2010-11-15 | © 2010 Apple Inc. All Rights Reserved.
Further Exploration 41
Chapter 4
Using iOS Simulator 43
Setting the Simulation-Environment Device Family and iOS Version 43
Manipulating the Hardware 44
Performing Gestures 44
Installing Applications 45
Uninstalling Applications 45
Resetting Content and Settings 45
Core Location Functionality 46
Viewing iOS Simulator Console Logs 46
iOS Simulator File System on Your Mac 46
Hardware Simulation Support 46
Chapter 5
Managing Devices and Digital Identities 47
Becoming a Member of the iOS Developer Program 47
Preparing Your Mac for iOS Development 47
Provisioning a Device for Development 48
Provisioning a Device for Generic Development 49
Provisioning a Device for Specialized Development 51
Installing iOS 52
Running Applications on a Device 52
Capturing Screen Shots 53
Managing Your Digital Identities 53
Chapter 6
Debugging Applications 55
Debug Facilities Overview 55
Viewing Console Output and Device Logs 56
Finding Memory Leaks 57
Chapter 7
Unit Testing Applications 59
Unit Testing Overview 59
Setting Up Testing 60
Setting Up Logic Testing 60
Setting Up Application Testing 62
Writing Tests 67
Running Tests 68
Running Logic Tests 68
Running Application Tests 69
Writing Testable Code 69
4
2010-11-15 | © 2010 Apple Inc. All Rights Reserved.
CONTENTS
Chapter 8
Tuning Applications 71
The Instruments Application 71
The Shark Application 72
Chapter 9
Distributing Applications 73
Publishing Your Application for Testing 73
Adding Application Testers to Your Team 74
Adding the iTunes Artwork to Your Application 75
Archiving Your Application for Testing 76
Sending Your Application to Testers 77
Importing Crash Logs from Testers 77
Instructions for Application Testers 77
Publishing Your Application for Distribution 79
Creating a Distribution Profile for Your Application 79
Archiving Your Application for Submission to iTunes Connect 80
Submitting Your Application to iTunes Connect 80
Chapter 10
iOS Development FAQ 81
Appendix A
Hello, World! Source Code 83
Appendix B
Unit-Test Result Macro Reference 85
Unconditional Failure 85
STFail 85
Equality Tests 85
STAssertEqualObjects 85
STAssertEquals 86
STAssertEqualsWithAccuracy 86
Nil Tests 87
STAssertNil 87
STAssertNotNil 88
Boolean Tests 88
STAssertTrue 88
STAssertFalse 88
Exception Tests 89
STAssertThrows 89
STAssertThrowsSpecific 89
STAssertThrowsSpecificNamed 90
STAssertNoThrow 90
STAssertNoThrowSpecific 91
STAssertNoThrowSpecificNamed 91
STAssertTrueNoThrow 92
5
2010-11-15 | © 2010 Apple Inc. All Rights Reserved.
CONTENTS
剩余99页未读,继续阅读
zyf_binghu126
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 永宏PLC例程源码东芝350T压铸机PLC程序
- Visual Basic语言教程.docx
- 永宏PLC例程源码18层永宏电梯程序
- Scratch语言教程.docx
- (资源包名是松下不必介意实际是台达)台达PLC例程源码自制收线架台达PLC程序(有注释)与威沦触摸屏程序
- Rust语言教程.docx
- (资源包名是松下不必介意实际是台达)台达PLC例程源码用台达PLC485通信控制11台英威腾变频启动停止速度设定
- (资源包名是松下不必介意实际是台达)台达PLC例程源码用台达EH2-40PLC两台控制5台台达ASDA-B伺服,天任文本作对话的
- (资源包名是松下不必介意实际是台达)台达PLC例程源码液压切块机程序
- (资源包名是松下不必介意实际是台达)台达PLC例程源码压瓦机
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页