Saturday, May 12, 2012

Testing iOS 4 Apps on the iPhone – Developer Certificates and Provisioning Profiles (Xcode 4)

Joining the iOS Developer Program

Being a member of the iOS Developer Program should not be confused with being a registered Apple developer. Being a registered Apple developer only gives you the ability to download the iOS SDK and access to additional developer related information. Membership of the iOS Developer Program, however, allows you to set up certificates and provisioning profiles to test apps on physical devices and, ultimately, submit completed apps for possible acceptance into the Apple App Store.
Enrollment into this program currently costs $99 per year. It is also possible that your employer already has membership, in which case contact the program administrator in your company and ask them to send you an invitation to join. Once they have done this Apple will send you an email entitled "You Have Been Invited to Join an Apple Developer Program" containing a link to activate your membership. If you or your company is not already a program member, you can enroll online at:
Having completed the enrollment process, navigate to http://developer.apple.com and click on the Member Center link located near the top right hand corner of the screen. On the resulting page enter the Apple ID and password associated with your iOS Developer Program membership to access the member center home page as illustrated in the following figure:

Deploying Your App to Your Own iPhone / iPad / iPod

When I first learned how to write an iOS application, I found that the biggest challenge wasn't in learning Objective-C, nor was it in becoming familiar with the Xcode IDE.  Instead, the main difficulty was in getting my app on to my own device!  Unfortunately, many of the books and tutorials assume you'll figure this out on your own... and as I learned, the process was not trivial:
  • I had to create a public/private key pair (via "Keychain"),
  • Generate a certificate request (via "Keychain"),
  • Login to the Provisional Portal at the Apple Developer Site,
  • Create and download a development certificate with the certificate request,
  • Find & register the UDID of my device,
  • Create an "App ID",
  • Create and download a provisional profile which links my developer certificate, UDID, and App ID together,
  • Install the certificate & profile into Xcode...

Saturday, May 5, 2012

Learn Objective-C: Day 4


Welcome to part four of this series on Objective-C. So far, we’ve looked a lot at theory and the principles and functionality of the language to get a good idea of how it works. Today, we will be making a simple class similar to the car example we looked at in previous parts of this series. Our class will take the details of a car, allowing us to get and set the values held. After today’s example you should be able to create your own classes in Xcode and toy around with them.
So far, we have had some great feedback via email, twitter and comments. Itʼs great to see so many people are interested in this subject and itʼs even better to see that so many of you are trying it out for yourself and asking some great questions. Keep it up!

Getting Started

Start by firing up Xcode and creating a new project. Under the Mac OS X separator, click Application, then click Command Line Tool. Finally, change the drop down box to set the type to Foundation.
Xcode New Project

Friday, May 4, 2012

Installing Tomcat on Mac OS X

To get Tomcat, visit the following link: http://tomcat.apache.org/. Once there, click on the Tomcat 5.5 link under the Download heading. Under Core, select the tar.gz file.
Download the tar.gz file. Mac OS X will probably extract the file to a .tar file in your downloads directory. Move this .tar file to a location on your computer where you would like tomcat. For purposes of this guide, the location will be /Users/user. Double-click the tar to extract it. This should create a directory in /Users/user named something like apache-tomcat . . . Rename this to something simple like tomcat. At this point, you should have the following directory on your machine: 

/Users/user/tomcat 

There is a file called startup.sh located in the the /Users/user/tomcat/bin directory that needs edited. Open EditRocket and open startup.sh Add the following two lines after the line in startup.sh that starts with EXECUATBLE. Note that for Snow Leopard, you can use 1.6 instead of 1.5 after the Versions text in the first line listed below. 

export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home
export CATALINA_HOME=/Users/user/tomcat
To start Tomcat, open up a Terminal window (Applications -> Utilities -> Terminal). cd to the tomcat bin directory by typing the following: 

cd /Users/user/tomcat/bin 

Type the following: 

sh startup.sh 

This will start Tomcat. To shutdown tomcat, type sh shutdown.sh
To test the tomcat installation, enter the following in your web browser: 

http://localhost:8080/ 

If the apache tomcat page shows up, the installation was successful.
There is a sample web application called jsp-examples located in the webapps directory under the tomcat installation directory. This location can be used to test your own JSP pages, or you can use the files contained in this directory as a template for creating your own web application. 

The jsp-examples can be accessed in your web browser using the following URL: http://localhost:8080/jsp-examples/

Thursday, May 3, 2012

"EGO" Xcode Theme for Xcode 4 + EGOv2

Almost two years ago now, we posted our Xcode theme, "EGO".  It's been significantly more popular than I ever thought, we've seen a lot tweets about, we've seen it in screen casts, and it even made an appearance in the product launch video for robotcat's Outside app.  There's no real metric for these things, but it seems to be one of the more popular third party Xcode things (we're number one in Google!).

Wednesday, May 2, 2012

Learn Objective-C: Day 3


Welcome to part three of this series -I hope youʼre enjoying it! Last week we looked at how we separate classes in to separate files (interface and implementation), this week weʼre going to look at classes again, but a little bit more in depth. Weʼll also take a peak at inheritance and how it works, along with variable scope.
So far, we have had some great feedback via email, twitter and comments. Itʼs great to see so many people are interested in this subject and itʼs even better to see that so many of you are trying it out for yourself and asking some great questions. Keep it up!

Tuesday, May 1, 2012

Learn Objective-C: Day 2


Welcome to part two of this introductory series on Objective-C. After spending last week reviewing the fundamentals of the C language upon which Objective-C is built, this week we will transition to focusing on what makes Objective-C such a great language for software development. Specifically, we will discuss the fundamentals of Object Oriented Programming (OOP) and demonstrate how to create a class and send messages to objects in Objective-C.

Object Orientated Programming

Why do we have Objective-C? Why not just use the underlying C language? The reason we have Objective-C is to give us an object oriented playground within which to build our applications. OOP is a programming paradigm that attempts to allow developers to think about software design in terms of objects and attributes instead of variables and functions. Specifically, OOP attempts to obtain data abstraction, encapsulation, modularity, polymorphism, and inheritance. The topic of OOP could easily fill a book (or a tutorial series) on its own, so instead I’ll introduce you to the basic principles by way of example.