Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 286 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
286
Dung lượng
14,57 MB
Nội dung
[...]... and source code management We’re also adopting modern iOSdevelopment practices, such as using Objective-C properties exclusively instead of using traditional instance variables and getting private methods out of public header files Our goal is for this book to serve as a prerequisite for all the other iOS titles from the Pragmatic Bookshelf, such as iOS Recipes: Tips and Tricks for Awesome iPhone and... to iOS 6 With all the advances in the tools and frameworks in iOS 6, it’s a great time to be starting our journey into iOS app development In fact, we should tell all our friends what we’re up to In this first chapter, that’s exactly what we’re going to do For our first example, we’re going to build an app to send out a tweet announcing that we’ve written our first iOS app We’ll get set up with the SDK. .. develop iOS 6 apps, we use Xcode 4 While “Xcode” generally refers to the integrated development environment (IDE) (in which we develop code and user interfaces and run a build process to generate the actual apps), it can also mean the entire collection of material we’ll need to build iOS applications When we download Xcode, we get not only the Xcode app itself but also the software development kits (SDKs)... SLServiceTypeTwitter]; [tweetVC setInitialText: @"I just finished the first project in iOS SDKDevelopment #pragsios"]; [self presentViewController:tweetVC animated:YES completion:NULL]; } else { NSLog (@"Can't send tweet"); } 5 10 - } We’ve replaced our one-line C logging statement with several lines of ObjectiveC, which is what iOS uses for most of its high-level APIs, such as UIKit and the Social framework... getting Xcode from the Mac App Store, and by the time we’re done we’ll be ready to upload our own apps to the iOS App Store Here’s a road map to the journey: • Chapter 1, Tweetings and Welcome to iOS 6, on page 1, starts by downloading and installing the SDK and beginning work on a first app, which uses iOS 6’s new Social framework to send a tweet telling the world that our journey is underway We’ll use Xcode’s... Technical Requirements The technical requirements for iOS development, in general terms, are pretty simple: a reasonably new Mac, running the most-recent production version of Mac OS X The specific version numbers increment ever upward; check out Xcode on the Mac App Store for the latest requirements For this edition, our baseline is Xcode 4.5 and the iOS 6 SDK (included with Xcode 4.5), running on Mountain... platform—between Xcode 4, iOS 6, and the iPad—we decided that so much had changed that we would be better off starting off fresh This freed us to embrace everything that’s new, making a complete cut with the past and writing a truly up-to-date book And there’s so much that’s new! The radically overhauled Xcode 4 is the first version of the development tool that’s truly built for iOS development, rather report... like the A5 comes a need for practical concurrent programming, something the iOSSDK answers with Grand Central Dispatch, a technology that allows programmers to divvy up small bits of code and data as “blocks” and let the system decide how best to run them In fact, it’s possible to have too much of a good thing, and the iOS 6 SDK is a good example In our first book, we worked to present most of the interesting... millions of units, and changed its name from iPhone OS to iOS to better reflect its multiple uses and perhaps to leave the door open to future devices The SDK has also grown in breadth and depth, adding new features, new frameworks, and new tools Since the first book, Apple has changed compilers and has radically overhauled Xcode, the primary iOSdevelopment environment As we did our day-to-day work with... variable tweetVC, which gets the *character, because it, like all Objective-C objects, is a C pointer On lines 6–7, we set the initial text of the tweet to "I just finished the first project in iOS SDKDevelopment #pragsios" by calling the setInitialText: method on tweetVC The leading @ identifies the string as an Objective-C NSString as opposed to a typical null-terminated C string This is all we need to . more qualified to teach you the ins and outs of Apple’s iOS SDK than Bill Dudney and Chris Adamson. Their all-new, updated book, iOS SDK Development, is a must-read, plain and simple. ➤ John C (like me) that are getting sick of PHP and .NET. ➤ Joel Clermont iOS SDK Development Chris Adamson Bill Dudney The Pragmatic Bookshelf Dallas, Texas • Raleigh, North Carolina Many of the designations. at http://www.last.fm/user/invalidname . From Bill Dudney I’d like to thank the many folks who have been to the Pragmatic iOS Studios ( http://pragmaticstudio.com /ios ). Your questions, insights, and struggles have been an inspiration