Friday, July 17, 2009

iPhone app distribution made easy - Part 2

Being able to build various distributions in the XCode IDE is great but you have to think about what you're doing very carefully. Thankfully the 3.0 version of the SDK comes with an improved command line build utility called "xcodebuild".

Here's an example of how to build the AppStore distribution:

xcodebuild -target "myAppAppStore" -configuration "DistributionAppStore" -sdk iphoneos2.1

As you'll notice the target, configuration and the sdk to use are being specified. Note: The sdk option is new for the 3.0 sdk and can take either the name or path of the sdk to use.

You can view all of the installed sdks by running the following command:

xcodebuild -showsdks

So now we have the ability to build the distributions without thinking about it. We could put this in a script and call it a day but lets not stop there. Next time we'll zip up the app bundle for submission to the AppStore or AdHoc users.

No comments:

Post a Comment