Skip to Content

Exclusive: Rock Band Unplugged Track List
AOL Tech

Xcode posts

Filed under: iPod Family, Developer, iPhone

Dev Corner: Signing iPhone apps for informal distribution

At times, iPhone developers might like to test out applications without going through the formality (or challenges) of ad hoc distribution. Ad hoc distribution was introduced by Apple to allow software testing on up to 100 registered devices. It is, admittedly, a bit of a pain.

Developers must collect device information (the "UDID", aka their unique device identifiers), register that device at the iPhone developer portal, create an special provisioning certificate, add a special entitlement, and build an ad-hoc only version of their software to distribute along with that certificate.

If all that seems like a hassle, well, yes it is. It is, however, the proper, authorized, and recommended way to distribute pre-release software, whether for testing or reviews. But there is another way.

If you know for sure that your target audience is another developer, the process becomes way easier. You can simply compile a normal development build of your application and send a copy of that build to another developer.

That's because each registered developer has the ability to sign applications. Although the app was built to work with just the in-house devices you've registered for development, another developer can re-sign that application using the simple command-line script shown here.

#! /bin/bash 
export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform\
/Developer/usr/bin/codesign_allocate

codesign -f -s "iPhone Developer" $1.app

This script uses Xcode's codesign utility to sign the already compiled version of the application. Once applied, you can then install the application through Xcode.

So is this a general distribution solution? No. And thank heavens for that; free trading of app binaries would rapidly lead to piracy. This approach allows developer-to-developer testing and collaboration only. The development signing is limited to the units you have personally registered.

If you want to try this out, follow the link at the start of this post. It leads to a testing folder I keep around and occasionally stock with software that I need tested. It also includes a copy of the script, which you must make executable (chmod 755 signit).

Filed under: Analysis / Opinion, Software, Odds and ends, Developer

The iPhone is a platform for coding newbies

I love hearing this about the iPhone: the San Francisco Chronicle has a piece about how Apple's little revolutionary telephone has brought a whole new crop of programmers into the development mix. People who had never before looked at code or considered writing their own applications are getting ideas about how to make better software, picking up Cocoa and Xcode books, and going to town. And strangely, we might actually have fart apps to thank for this -- people aren't just seeing the iPhone as an innovative platform, but they're seeing the App Store as an "anything goes" environment, where even their silly little idea might work.

I don't know if we can pin all the credit for the burgeoning iPhone development scene on fart apps and the impression that even a monkey can make bestselling iPhone software (certainly Apple has set the bar and price for entry pretty low, both with the extremely cheap $100 fee for a developer account as well as the high quality Xcode software that comes on every Mac), but there is definitely something in this little device that's driving people to try and create their own software for it.

Oh, and the money probably helps, too. Still, whether people are taking up iPhone development because they want to make millions or are just looking for another hobby, it's us, app consumers, who will benefit.

Filed under: Features, How-tos, Developer, iPhone, iPod touch

iPhone Dev 101: The "Hello World!" app

In the last iPhone Dev 101 post, I told you a little about creating your first project using Xcode; however, in this post, I want to show you how to create your first application that will run in the iPhone simulator. In honor of staying with the classic way of teaching programming, we'll create a "Hello World!" application as our first one.

Creating the new project
If you have installed the iPhone SDK/Xcode, then you can launch Xcode by navigating to /Developer/Applications. Once there, you can double click on the Xcode application (you may also find it handy to just drag the icon to the dock if you will be using it a lot).

Once Xcode launches, click File > New Project. Under the iPhone OS section on the left side of the resulting window, select "Application." Select "View-based Application" from the templates that show up on the right side, and then click the "Choose" button. You will then be prompted to specify a project save name -- this will also be the name of your resulting application, so choose your project name wisely.

You're project has now been created, and the Xcode window that is displayed will contain all of your code, resources, etc. There isn't much there now, but the application is fully functional at this point. You can click the "Build & Go" button in the toolbar, and the application will be compiled and launched in the iPhone Simulator. Again, this is a fully functional application, but it doesn't do anything useful at this point -- the usefulness of the app is up to your coding, but Apple supplies you with the base code and dependencies.

Continue readingiPhone Dev 101: The "Hello World!" app

Filed under: Features, How-tos, Developer, iPhone, iPod touch

iPhone Dev 101: Creating Xcode projects, brief Xcode UI overview


In our last iPhone Dev 101, a continuing series on iPhone development, we talked about resources that you can use while you are coding with Cocoa. In this dev post, I'm going to walk you through Xcode and creating your first project.

First we need to open Xcode, so once you have the SDK installed, you'll need to open /Developer/Applications/ and look for Xcode.app. This is Apple's IDE (Integrated Development Environment) that allows you to code, debug, test, and build all of your iPhone and Mac applications. When you open this application, nothing specially really happens, although you might see the welcome center -- if you see this, you can choose to disable it at startup by using the check box at the bottom.

To create a new project, select File > New Project. In the resulting window select iPhone OS Application > View-based Application, and click "Choose." You will then need to specify a save name and location for the resulting files that will combine to create your application. In the resulting Xcode window, you should note that most of the work is already done for you!

At this point you have a fully functional application. Try it out: click the "build and go" button at the top of the window and wait while the app is compiled and opens in the iPhone Simulator. The app definitely doesn't do much, but still, it's a running application you made without writing any code.

Continue reading to learn more about Xcode, and get a brief UI overview.

Continue readingiPhone Dev 101: Creating Xcode projects, brief Xcode UI overview

Filed under: Analysis / Opinion, Gaming, Software, Odds and ends, iPhone, App Store, iPod touch

Rolando's Simon Oliver in the Daily Mail

The Daily Mail has reported the story of our friend Simon Oliver, creator of Rolando (whom we interviewed quite a while ago when the game originally came out). Apparently things have worked out very well for him -- the game has sold 700,000 copies so far, Oliver's set to be a millionaire, and he's now, as he says, the head of a game studio that already has a hit under its belt. Very impressive (too bad they still call him a geek).

It's stories like this that are pushing the little App Store bubble we've got going nowadays -- every investor with money to spare (not as many as usual, given the current economy) is happy to sink it into releases for the iPhone, and while there is plenty of money being made, not every developer ends up like Oliver (let's not forget he had a quality product in the first place).

But there is some good news here: without the App Store and the iPhone platform, this never would have happened. Say what you want about Apple's release policies or their initial "no SDK" choice, but with the iPhone, they've brought development and distribution down to anyone who can dream it.

Filed under: Open Source, Developer

Cocotron: bringing Cocoa to Windows

Cocotron is a potentially exciting open-source project that "aims to implement a cross-platform Objective-C API similar to that described by Apple Inc.'s Cocoa documentation." What this means is that, in principle, Cocotron would allow an OS X Cocoa app written in Xcode to be easily cross-compiled for other OSes, particularly Windows.

Of course that in principle still leaves open a bunch of practical difficulties. The guys over at Magnetism Studio (developer of FileMagnet for iPhone) have a great account of how they used Cocotron to port their Mac FileMagnet Uploader to Windows. Of course it wasn't as easy as pressing a button and having a Windows executable pop out of Xcode, but after suitable adjustments (particularly to get rid of Mac-specific code) it did make a Windows version possible. In any case, Cocotron seems poised to make cross-platform development a much less costly and time-consuming process for Mac developers.

Cocotron itself is a free download and released under the MIT license.

[via Daring Fireball]

Filed under: How-tos, Developer

Apple Tutorial: Developing with MacRuby

Apple has posted an interesting new tutorial on developing OS X applications with MacRuby. MacRuby is an implementation of the Ruby programming language "ported to run directly on top of Mac OS X core technologies such as the Objective-C common runtime and garbage collector, and the CoreFoundation framework."

What this means is that applications written with MacRuby can be a full-fledged Cocoa application with all the advantages that entails. The tutorial will take you through the process of installing MacRuby as well as building a sample application with Xcode. So if you've ever wanted to get started thinking about developing for the Mac, but have always been intimidated by Objective-C (which pretty much describes me), playing around with MacRuby might be just the ticket to get you started.

[via MacVolPlace]

Filed under: Developer, iPhone, iPod touch

An iPhone developer's story

If you're curious about developing for the iPhone, but haven't made the plunge yet, you might want to read Rogue Amoeba programmer Mike Ash's 22-step tale of developing NetAwake, which is available in the App Store.

It's a fascinating story, with a lot of waiting, a lot of rejection, and a lot of "screwing about in Xcode."

"The errors are essentially worthless. I believe I only ever saw Xcode generate one error, over and over and over again, as it encountered a whole bunch of different problems," he wrote.

The app took a month to approve, once it was submitted. Ash says that the people he corresponded with at Apple were "nice about responding to my query" but "spending a month in limbo for a single bug is a very poor tradeoff."

Filed under: Software, Cool tools, Developer

XThemes: Your favorite TextMate themes ... in Xcode

I unabashedly love TextMate, and I love my TextMate themes. I do, however, spend a fair amount of time in Xcode, which is why I was excited to find XThemes. With a little bit of drag and drop, you can convert any TextMate theme -- in all of its splendor -- into an Xcode theme.

Yes, it's for a limited audience ... namely TextMate die-hards who also use Xcode frequently enough to miss the themes they love (and have probably spent a fair amount of time tweaking). If you fit into this niche, you'll definitely want to take a look. XThemes: $0. Feeling at home coding outside of TextMate ... priceless.

Filed under: Books, Developer

Bookwatch: Cocoa Programming for Mac OS X gets updated

Way back in December, our Christmas Gift Guide featured our pick of the many OS X-related books out there. One of the recommendations was the (very excellent) Cocoa Programming for Mac OS X by Aaron Hillegass - commonly referred to as 'The Bible' in the Mac development community.

At the time the book was a little outdated -- however in the last couple of weeks an updated third edition has been published. New sections feature Objective-C 2.0, Core Data, Garbage Collection, Xcode 3 and Core Animation, meaning this third edition is all ready for many of the new technologies in Mac OS X Leopard.

At just $32 (via Amazon.com), this updated version clearly ought to be on every developer's bookshelf (and aspiring developer's wishlist).

Filed under: Video, Developer, Found Footage

Video Introduction to Cocoa


Over at Theocacao Scott Stevenson has posted the video of his Introduction to Cocoa talk (entitled "Best of Both Worlds") aimed at those who want to learn a bit about Apple's preferred API for building OS X applications. The talk runs to over 90 minutes and includes "an introduction to Xcode, Interface Builder, Objective-C, Mac UI standards and more."

For anyone who has ever wanted to figure out what those developers tools are all about this is definitely worth (the rather large) download (scroll down towards the bottom) though it seems that a lot of folks are have problems getting the whole file (myself included). There's also a torrent available.

Filed under: Software, Developer

GrowlCode brings Growl to Xcode

Do you like Growl? Do you use Xcode? Then chances are you'll like GrowlCode. GrowlCode is a plugin to integrate Growl's on-screen alerts into the Mac OS X developer app, Xcode. GrowlCode integrates the following actions: Build Succeeded, Preprocessing Complete, Compilation Succeeded, Clean Complete, and many more.

To use GrowlCode, you will need to download both GrowlCode and Growl (which is available at Growl.info). GrowlCode is compatible with Xcode 3.0 and Mac OS X Lepoard (10.5) and Tiger (10.4). Instructions for installing can be found on the GrowlCode website.

Filed under: Developer, iPhone

iPhone SDK beta 2 now hitting the streets

After a brief false alarm earlier today, it looks like beta 2 of Xcode 3.1 (including the iPhone-ready version of Interface Builder) is actually released. A word of warning: Apple's servers are getting hammered right now, and it may pay to wait a while before downloading the 2.1 GB package.

While you wait, you can peruse the release notes for Xcode and for Interface Builder. Never hurts to read the documentation. Have a good weekend, all you iPhone coders!

P.S. One of our loyal tipsters, PJ, noted that he sent us an email about 36 hours ago with his surmise (based on a link he saw, behind the Apple developer site login wall, to a Beta 1 -> Beta 2 diffs manifest) that the revised iPhone SDK might be imminent. PJ, for the record, you guessed right.

Thanks Nik + PJ

Filed under: iPod Family, Developer, iPhone

iPhone SDK works on PowerPC Macs, sort of

A MacRumors post suggests that the recently released, "Intel-only" iPhone SDK works on PowerPC Macs as well. According to the post, it worked fine on a iBook G4 running Mac OS X Leopard. The post did go on to say that Xcode displayed an error message upon trying to build a project, saying that the "target architecture does not match." Errors like these are to be expected, but at least those PowerPC-using developers can start to develop for the iPhone. There is no word yet on how the $99 digital certificate will work on the PowerPC Macs.

3by9's website has the full details on how to get the SDK running on your PPC Mac.


[original post by 3by9]

Filed under: Software, Developer

XcodeTemplateFactory

You know what they say about those who can't code, they blog about those that can. It is in this spirit that I offer up XcodeTemplateFactory. If you don't find yourself using XCode on a regular basis I'll save you a few moments and tell you to stop reading this post now. Check out the MacBook Paper again. Funny, right?

Ok, are they gone? Good, it is now just me and you, dear developer! Now, you'll get a whole lot more out of XcodeTemplateFactory than I will, but it is my duty, as an influential and powerful blogger, to point you in the right direction. You're probably swimming in a ton of XCode projects, and every time you set up a new one you curse the sky because you must keep setting the same things over and over again. XcodeTemplateFactory lets you keep a special project which is set up just the way you like, and from which you can deploy new projects. All the projects deployed from the template are set up just like the original. It'll save you time, and it won't cost you a dime (that rhyme was also free).

XcodeTemplateFactory is a free, open source utility from Hog Bay Software, makers of TaskPaper (which I quite enjoy).

Tip of the Day

Holding the Command key (aka the Apple key) and pressing Tab will cycle through your open applications. It's easier to Cmd-Tab if you are Copy (Cmd-C) and Pasting (Cmd-V) to and from various applications.


Follow us on Twitter!
TUAW [Cafepress]

Sponsored Links

Featured Galleries

DNC Macs
Macworld 2008 Keynote
Macworld 2008 Build-up
Google Earth for iPhone
Podcaster
AT&T Navigator Road Test
Bento for iPhone 1.0
Scrabble for iPhone
Tom Bihn Checkpoint Flyer Briefcase
Apple Vanity Plates
Apple booth Macworld 07
WorldVoice Radio
Quickoffice for iPhone 1.1.1
Daylite 3.9 Review
DiscPainter
Mariner Calc for iPhone
2009CupertinoBus
Crash Bandicoot Nitro Kart 3D
MLB.com At Bat 2009
Macworld Expo 2007 show floor
Apple Texas Hold 'Em

 

More Apple Analysis

AOL Radio TUAW on Stitcher