“Apple has always been covertly operating while the leaders of technology were sweating to convince the world with their inventions. On one fine day, Apple finally opened the gates to reveal a mysterious remarkable piece of technology that mesmerized the world, which never expected, which never saw, and would have never thought of. The first multi-touch fluid user-interface gesture built for the iPhone and later for the iPod. This is the same famous Apple line of portable media players which soon became the market leader after its launch. iPod was not only capable of playing music and videos, but games too. Later launch of iPhone took by storm. In 2007, Steve Jobs realized that developers could create applications that will act as native apps for these devices. The same year Apple announced the SDK for the mass developers around the world. Powered by the iOS which is derived from the Apple Mac OS X, specially designed for Apple embedded hardware, got thousands of apps in few months and later this number went to lakhs in few years. Building applications was never easier on a Mac, when XCode took the developers to the next level. XCode is a suite of tools that assist the complete nurturing of the developers and development cycle. The ‘weird looking language’, also best known as the Objective-C is in the heart of this toolset. XCode has gone 4 major version changes, latest being the 4.2. This book will take you to the roller-coaster ride of the new features of XCode 4.”
Xcode 4 iOS Development Beginner’s Guide
||Steven F. Daniel
||Packt Publishing Ltd.
|About the Book
||“Use the powerful XCode 4 suite of tools to build applications for the iPhone and iPad from scratch”
About the Author
Steven F. Daniel has been developing desktop and web-based applications for more than 13 years for a number of companies, in various sectors. He was also a member of the SQL Server Special Interest Group (SQLSIG) and the Java Community. Daniel owns and is founder of GenieSoft Studios, a software development company based in Melbourne, Victoria, that currently develops games and business applications for the iOS, Android, and Windows platforms.
He also co-founded SoftMpire Pty Ltd., a company that focused primarily on developing business applications for the iOS and Android
Xcode 4 iOS Development Beginner’s Guide happens to be his first effort in writing and authoring book. Before we begin exploring, being the first book, Author has shown great effort designing this book.
About the Book
‘Xcode 4 iOS Development Beginner’s Guide’ was published in August, 2011 by Packt Publishers under the ISBN 978-1849691307. The book covers lots of necessary information to glue your hands on to the XCode Environment. The chapters includes number of topics from introducing to the tool, such as introduction to XCode4, IDE Workspace, IB or the Interface builder (UI Drag and Drop), with good examples and theory for XCode libraries, designing Apps with MVC approach, and Multi-touch. Familiarizes with developer tools i.e. debugging and inbuilt source control, and finally optimizing apps and deployment on iOS enabled devices.
The book’s web-page is maintained by the Packt Publishers. The page contains sample chapters, table of contents, and errata info. The book can be purchased in PDF and hard-back forms. Exclusive source code and resource access is only for Packt premium members. For more information on the purchase, please visit the Packt Publishers Page. The book’s preface is short, precise and gives a complete overview of the contents of the book.
First Chapter is all about introduction to the XCode and a compatible Mac version. Since the release of the iPhone in 2007 there have been large number of Apple owners and this has lured maximum developers to build application for them. If you are completely new to XCode and interested in developing applications then this chapter would be a good kick-start. To begin with XCode, author presumes that XCode 4.x is installed on a Mac machine. If you don’t have one, then you might want to skip this review and don’t buy the book! :). Mac is not like windows and won’t install on most machines unless tweaked ;). XCode is very much downloadable and free from Apple’s developer site and definitely, you want to grab a copy ASAP. As of now, there is an updated version 4.2 of XCode is available, which is only compatible with Mac OS X 10.7 Lion. However, the topics covered and explained in this book doesn’t change much. Further, this chapter gives reader a nice insight of the iOS architecture, explains how each layer is organized into frameworks, explains the Cocoa framework and Cocoa touch. There is a very short introduction to Objective-C, which is not very catchy. The chapter finally ends with overview of XCode tools and new features of version 4.
XCode 4 interface is completely different from the previous versions. Second chapter proves beneficial as it introduces the reader to various IDE workspace areas such as Navigator Area for project and files, Editing Area for writing code, Utility Area for properties, and Debugger Area and Libraries such as File Templates, code snippets and Object library. To familiarize with any environment, one needs to try it. There are few sample projects that reader can create, compile and launch (in a iPhone emulator) to get the feel of development on this environment. Later reader will explore more on the Unified navigation toolbar, workspace elements for assistance in programming, and finally setting preferences for XCode environment. Truthfully, if you have worked on any IDE such as Visual Studio (the most famous of all) or may be Netbeans/Eclipse, XCode interface won’t differ much and more or likely is similar, the only difference lies in the look and feel.
Transition to XCode 4
A good IDE makes life easier for developers and XCode is one of them. IB or the Interface Builder of XCode is a visual tool that enables the user to design an interface for devices such as iPAD and iPOD, by dragging and dropping views on to the window. This tool is comparable to any design tool that follow WYSIWYG (pronounced: Weesiwyg). Chapter 3 is all about this design tool and contains topic such as creating First GUI application with explanation of the basic application life cycle (this is must for device applications to perform better), View with Auto-rotate interface (Accelerometer input), attaching events to object for user interaction like button click and message display, repositioning controls such as on-screen keyboards that change according to the objects and orientation of the device, document based applications to view or write text, and then saving into files. The chapter is well organised, contains enough screenshots and code snippets to ensure the reader’s smooth pickup speed.
At the heart of iOS architecture, resides the Cocoa framework that provides the shared resources such as dynamic library references, image files, header files to the application whenever needed. Cocoa framework is comparable to the .NET/JRE that provides runtime references like DLL/JAR for their respective applications. Chapter 4 lists down framework names, (or the namespaces for better understanding) that are used predominantly. There are hands-on examples to create database applications that uses SQLite (data centric applications) very similar to SQL adapter classes in .NET and Java, demo applications using AV (Audio-Video) framework for managing audio and video content, GPS application for Geo-awareness, and lastly a task for the reader to modify existing demo application. This chapter is a good introduction to the framework namespaces and, good for programming references.
Developing iOS application requires reader to be aware of MVC architecture. Chapter 5 serves a resource for iOS MVC architecture and contains good explanation of the pattern, followed by a pizza order application where all the MVC concepts are shown as examples. This chapter also introduces the Table-views, adding controls to the view and reposition or resize them. It also covers how to use components such as Switches, Sliders, Segmented Controls, ScrollingViews, WebViews, Controls, ScrollingViews, WebViews, Scrolling Views, Web Views, Pickers, Date Pickers, Custom Pickers using Interface Builder or IB. To control any of these view controllers, a control object is bound using outlets and actions, which is again same as any delegates, listeners , in short, events. If the user is aware of any major languages this would seem very easy. Chapter 5 would serve a good reference point for developing serious applications since it covers lots of important concepts and techniques.
Chapter 6 is more or less an extension of chapter 5. This chapter mainly focuses on interacting with users and alerting them with the application status in case of errors or some notifications. In my opinion this chapter should have been integrated with chapter 5, a separate chapter was not at all required.
Apple’s Multitouch technology by detecting finger gestures is evolutionary. In Apple devices screen is the only interface with which a user can communicate to the device application. Chapter 7 begins with a very brief explanation of the Multi-touch architecture followed by examples to attach UI events for taps, swipe to change color, and zooming effect using pinch gesture. Apple gestures can also be produced using tilting or shaking, which is governed by an on-chip accelerometer. Examples includes the shake and motion effect to detect change in motions, creating applications that can switch to landscape or portrait view depending on the device’s orientation change. The topics covered here only forms the basis of the iOS development and very much explained in beginner’s guide fashion. Do remember that the multi-touch is a hardware feature that cannot be emulated. Overall flow of the chapter is acceptable.
Writing codes without mistakes!………………that is something impossible to believe. XCode environment comes with set of tools to debug iOS application and trace them down efficiently. XCode 4 debugger has been modified to sophistically monitors the running code and reports information line-by-line. XCode contains a wide variety of debugging tools that provides assistance to the iOS developers and this chapter contains a real good explanation for each of them. Topics covered such as classic debugging, LLVM debugging to highlight erroneous lines while typing in code, the new improved in-editor debugging tools, scheme editor for device or emulator based debugging, static analyzer to scan and automatically fix syntax errors, advanced functions like detecting an memory leak, and orphaned/uninitialized objects/variables. The last two topics of this chapter is about intellisense and disable code suggestions, which are more or less editor features and should have been covered in initial chapters.
Version control is an important aspect of team development as it keeps track of the whole development process. With XCode 4.0, the version editor control is now a part of the development environment. In Chapter 9: “Source Code Management with the Version Editor“, reader will get acquainted with the subversion systems by creating local subversion and repositories. This subversion control is almost similar to other systems such as Tortoise SVN, CVS, and the most popular Team Foundation Server. This chapter is pretty much informative and recommended for professional or serious XCode developers.
The next chapter runs the reader through inbuilt facilities that can be effectively used for measuring application performance. XCode comes with an “Instrument” which can be used to collect information about the application over time. Topics include introduction to the Instrument tool, designing an application to use this tool and profiling it, adding and configuring instruments for trace, and new instruments in XCode 4. As the new instruments are little advanced topic, beginner’s guide wont suffice and author has only provided very little information about each instrument, which is understandable.
Last chapter deals with deployment of application to the app store. Author has provided good amount of steps from getting iTunes premium membership to uploading the application to the Apple app store.
- Very smooth flow and transition of topics from basic to advanced.
- Quite impressive usage of informative (Usage of arrows and boxes to highlight areas of an image) images and codes through out the book.
- Every example is explained in step by step manner following the beginner’s approach, followed by a detail information in “What just happened” section.
- While explaining a feature, author has compared XCode to other analogous development environments.
- References and links are provided wherever required keeping the context clean and unambiguous.
- Excellently providing useful introduction to OOPS, MVC Architecture, and accelerometers or gyroscope.
- “Pop Quiz” section is poorly designed and not at all impressive.
- There are certain chapters that have been presented separately, which was basically not required.
- Intellisense and preferences topics in chapter 7 are misplaced.
Language and Tone
Author has used class room approach to convey the working behind each concept with the usage of simple words without exaggerating the topics.
Making iOS apps on Mac was never so easier, thanks to Apple’s extensive R&D on XCode development environment, and with version 4.0 comes a whole new package of feature set. Daniel’s first attempt to author this book is amazing and would be a good start for beginner’s. I found the book very, informative, and simple to follow. If you are experienced in one or more IDE’s, then this book would be very lucid.
Some part of the code snippets mentioned in the book may confuse at times, make sure you have the source code with you, available at Packt’s site. iOS development requires you to be acquainted with Objective-C. Unfortunately, this book won’t teach you Objective-C, as it requires a dedicated book. For learning objective-c language grab Programming in Objective-C by Stephen G. Kochan.
Finally, this book is a nice informative book for XCode 4 IDE only. There are other useful resources at Apple’s developer site which will be a helpful reference while reading this book.
Here are the individual ratings of each component that I chose to review this title:
|TOPIC EXPLANATION – BASIC*
|TOPIC EXPLANATION – IN-DEPTH*
|TONE OF THE BOOK*
|RELEVANCE TO THE XCode 4*
|MISC FEATURE – Pop Quiz*
|GENERAL AUDIENCE LET DOWN**
|QUALITY OF EXAMPLES*
Overall Rating for the book
* higher is Better. ** Lower is better.
GPUToaster™ rates this book 8.5/10.
This book is available from the publishers site, Packt as well as from the major sites such as Amazon, Barnes and Nobel.
Xcode 4 iOS Development Beginner's Guide
Xcode 4 iOS Development Beginner's Guide Full-fills most of the expectations, recommended reading for beginner's.