Online Test Banks
Score higher
See Online Test Banks
eLearning
Learning anything is easy
Browse Online Courses
Mobile Apps
Learning on the go
Explore Mobile Apps
Dummies Store
Shop for books and more
Start Shopping

Using Xcode to Develop an App

To develop an iPhone, iPod touch, or iPad app, you have to work within the context of an Xcode project. Xcode supports the following activities that are parts of developing your application:

  • Creating an Xcode project

  • Developing the application (designing the user interface using a storyboard, coding, and running and debugging the code)

  • Tuning application performance

  • Distributing the application

Create an Xcode project

To develop an iOS application, you start by creating an Xcode project. A project contains all the elements needed to create an application, including the source files, a graphical representation of the user interface, and build settings needed to build your application.

You work on your project in the Workspace window, which allows you to create all of these elements as well as build, run, debug, and submit your application to the App Store.

Develop the application

You have a lot to do to develop an application. You need to design the user experience and then implement what you came up with as a user interface. You need to write code to implement the features of the app. You also need to test and debug the app.

Designing the user interface using a storyboard

Xcode’s Interface Builder is the editor you use to assemble your application’s user interface with the help of preconfigured objects found in the Library. The objects include windows, controls (such as switches, text fields, and buttons), and the views you’ll use, such as Image, Web, and Table views.

The Interface Builder editor allows you to add objects, configure their properties, and create connections not only between user interface objects, but also between user interface objects and your code.

When you use a storyboard, most if not all your screens end up being displayed in the storyboard, and Interface Builder saves your storyboard in a storyboard file (with the .storyboard extension). When you don’t use a storyboard, each screen is saved separately as a nib file (with the .xib extension).

Either way, these files contain all the information iOS needs to reconstitute the user interface objects in your application at runtime.

Interface Builder saves you time and effort when it comes to creating your application’s user interface. You don’t have to code each object (thereby saving you a lot of work), and what’s more, because Interface Builder is a visual editor, you get to see what your application’s user interface will look like at runtime.

Coding

To code, you use the Source Code editor, which supports features such as code completion, syntax-aware indentation, and source code folding (to hide “code blocks” temporarily). You can get context-based help to assist you, and if you need information about a particular symbol, you can either get a summary of a symbol’s documentation directly in the editor, or you can opt for more extensive documentation in the Organizer.

Xcode’s Live Issues and Fix-it features work together to point out mistakes as you enter your code and offer to fix those mistakes for you.

Running and debugging

When you run your application to debug or test it, you can run it in the iOS Simulator on your Mac and then on an iOS-based device (if you’re in the developer program). Using the simulator, you can make sure your application behaves the way you want. You can also get debugging information — as you run — in the Debug area.

By running your app on a device connected to your Mac (still using the debugger, if you like), you can observe the actual user experience and see how the app will perform.

Tuning application performance

The Instruments application enables you to analyze the performance of your application as it runs in the simulator or on a device. The Instruments application gathers data from your running application and presents that data in a graphical timeline.

Among other measurements, you can gather data about your application’s memory usage, disk activity, network activity, and graphics performance. This data enables you to analyze your application’s performance and identify performance and resource usage problems.

Distributing the application

Xcode provides various kinds of application distribution, including

  • Ad Hoc Distribution for testing on up to 100 iOS devices.

  • The App Store for distributing to hundreds of millions of iOS device users. You can give your apps away for free or let Apple sell them for you.

  • Custom B2B Apps for distributing business-to-business apps directly to your business customers who have a Volume Purchase Program account.

You create an archive of your application that contains debugging information, making it easier to track down bugs reported by testers (and users) of your application. When your application is ready to go, you submit it to the App Store.

(Before you submit your app to the store, you can even run some of the same software-validation procedures on your applications that Apple does. Passing these tests makes your application’s approval process as fast as possible).

  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus
Advertisement

Inside Dummies.com

Dummies.com Sweepstakes

Win $500. Easy.