Mavericks is for free!

I was pleasantly surprised when I realized Apple is releasing Mac OS 10.9 Mavericks for free. That is not the only good news, Apple will be releasing iLife and iWork for free for people buying new systems.

As I see it, Apple wants all it’s customers to use the latest version of the OS. I can break down the advantages into 3 categories.

Mac guys still dislike Microsoft!

Mac guys still dislike Microsoft!

Apple is diverging into different product markets. I don’t think Apple has the manpower at its disposal to work on all the products. This year there were news around, that Apple had moved developers from OS X team to work on iOS, so that iOS releases on time.

If all or most users migrated to a fixed version of OS Apple can reduce the size of development team needed to work on support activities for older version of OS like Snow Leopard (10.6), Lion (10.7) and Mountain Lion (10.8). This would free up developers to work on development of newer products.

Apple plans to use free OS updates to coax people to upgrade to newer version of the OS.

How will it affect Apple’s bottom-line?
It will end up working out well for an Apple. Apple is a unique PC maker in that they make both software and hardware. Apple is already releasing iOS updates for free and I think there are more benefits providing free updates and Apple can manage it.

How often have you written a piece of code in ifdef‘s because your application was meant to run multiple versions of the OS. At least I have had to write it quite frequently. Cocoa is a dynamically growing Framework. Every year a new version of Mac OS or Xcode releases new API’s are added and some older ones are deprecated. More often than not most companies prefer having single code base for an application for ease of development and support. This just leaves developers without much of an option, ifdef is the only option.

Just take look at the number of people using Windows XP (release date: August 24, 2001). There have been three major OS release since Windows XP and most companies still provide support for Windows XP.

Both Windows XP and Snow Leopard have sizable market share and any developer would not want to ignore the market.

End Users
Real winner is the end-user. Imagine getting new version of the OS every other year for free!

All in all I think it is a great move. Similar to Kid Rock charging 20$ for concert tickets.

Now the pressure will be on Microsoft and other proprietary OS maker to provide free upgrades to the user! But I don’t expect them to follow suite. Microsoft is not a hardware manufacturer and cannot afford to release either MS Office suite or Windows OS for free. Personally I believe, I deserved a free upgrade from Windows Vista to Windows 7.

Opinion Poll Link


Mac OS X: Burining disc

There are many ways of burning a disc on Mac OS X. This is one of the way.

1. Insert an empty DVD/CD into the DVD tray/drive and wait till it mounts. Once it is mounted you would see an icon with name “Untitled DVD“. Drag and drop the contents to be burned into the icon.


2. Go to Finder Menu and select File -> Burn “Untitled DVD” …

3. Finder will, throw up a dialog asking for Disc Name and Burning Speed. For Disc Name give an appropriate name and for Burning Speed keep the default value or set the maximum speed available. Click the “Burn” button.


4. A progress dialog will be shown for the burn process.


5. DVD/CD icon will be replaced by the locked folder icon.

1. If you cancel while the disc is being burned, the CD/DVD will be incomplete and unreliable. You should not use it.

Mountain Lion Signing packages

The intention of this blog is to guide you through signing of the packages(pkg) or installer for Mac OS X 10.8 (Mountain Lion). There are different ways to make installer for Macintosh and one of the most preferred way is to use PackageMaker. PackageMaker is an application released by Apple for making installer. It’s pretty easy to do basic things with PackageMaker but customized things aren’t very easy to do. The problem being there is very little useful documentation from Apple.

Coming back to task at hand, We need to sign our package using Apple’s Developer ID Installer Certificate for the Gatekeeper to allow the installer to run. There are two simple steps.

Step 1: Create a normal (unsigned) installer using either the UI or the command-line version of PackageMaker

Step 2: Use productsign to sign the Package

Usage: productsign [options] –sign identity input-product-path output-product-path

This would work as long as the installer is of PKG format (flat). Signing of MPKG format is not supported.

Properly Signed Installer

Properly Signed Installer

Avoid using any of these methods.

1. Signing the Package using PackageMaker’s UI

2. Signing the Package using PackageMaker’s command line tool

Incorrectly signed installer

Incorrectly signed installer

If you compare the incorrectly signed installer image with the correctly signed installer image, you would find one difference. Incorrectly signed installer does not have Developer ID Certification Authority certificate. Without this certificate the Gatekeeper cannot verify the signed installer and hence rejects it. The problem is with PackageMaker, it doesn’t add the Developer ID Certification Authority certificate while signing the installer.

Exporting Apple Developer Certificate

According to Apple only an Agent can generate and download the developer certificates. Once the certificates are installed in a machine it can be shared with other users. KeyChain Access application has a simple feature for exporting the certificates.

Steps involved in exporting the Apple Developer Certificates.
1. Go to “/Applications/Utilities/” and Launch Keychain
2. Click on the “Certificates” Tab

3. Select “Developer ID Installer: My Company” certificate.
4. Right Click on the certificate and select Export “Developer ID Installer: My Company”

5. A dialog would appear select Personal Information Exchange (.p12) format and give the certificate an identifiable name. By default the new certificate will be saved in Documents folder.

6. Keychain Access application would ask for a password. Enter a password, this password would be asked when you try to install the certificate on the other machine. So remember the password!

Your certificate would have been exported to the selected folder (By default the “Documents” Folder). Repeat the same steps to export “Developer ID Application: My Company.

While exporting Developer ID Certification Authority certificate Keychain Access access would not ask for the password and the File Format should be Certificate (.cer).

Installing the certificate
Double click on the exported certificate. Keychain Access application will launch and display a dialog asking for the password. Enter the password set in step 6.

That is it for this post! You now know to export and install Apple Developer certificate.

Splitting and joining files in Macintosh and Linux

There are lots of tools available on PC (Windows) for splitting and joining files. There are very few available on Macintosh and Linux. But on Macintosh and Linux we don’t really need a separate tool for splitting and joining files the OS comes with one for us.

Splitting and joining files are pretty straight forward. There are two simple command line tools to do it. In this entire exercise we will be using only 3 command line tools.

1. Change Directory.

cd – change the current working directory to a specific Folder.
cd [-L | -P] [directory]

2. Splitting the File.

split — split a file into pieces
split [-a suffix_length] [-b byte_count[k|m]] [-l line_count]
[-p pattern] [file [name]]

3. Joining the File.

cat — concatenate and print files
cat [-benstuv] [file …]

Lets get down to business and start splitting the file.

File Split
I didn’t have any big file to try the commands on. So I compressed Google Chrome application.

Created Google Chrome Zip File

Get into the folder containing the huge file using cd (change directory) command

cd path/to/the/folder/containing/file
split -b 50m “Google” ChromePieces

“Google” -> Name of the file to be split
ChromePieces -> Prefix of output file name.
-b -> Create smaller files byte_count bytes in length.
50 ->byte_count value.
m -> indicates megabyte pieces. k can be used instead for kilo-byte pieces

Used “split” command to split the file

The zip file size was 93.1 MB. So it ended up creating two files. As can be seen from the image above.

Joining Files

Used “cat” to join the files

cat ChromePieces* >

We are joining all the files that have prefix file name “ChromePieces” and the resultant file will be created as

A new ( file is created.

Unzipped the newly created zip file.

You can unzip the file and Google Chrome application extracted would work as normal. Split and cat can be used on most of the files. I have tried it on binaries(Application & Installers), Audio and Video Files, Text files.

Mountain Lion Certificates

Before starting up Certificate generation, there are some important concepts to be understood. There are three possible roles that can be assigned to Apple Developer Program members: Agent, Admin, or Member.

Borrowed from Apple’s website.
1. Agent
The Agent (the original enrollee accepted into an Apple Developer Program) is the primary contact for the development team, is responsible for accepting all Developer Program Agreements, and can enroll their team in additional Apple Developer Programs.

2. Admin (company/organization only)
Developers assigned the Admin role serve as a secondary contact for teams enrolled in an Apple Developer Program as a company. Team Admins can invite members to the team, assign roles, and have access to the resources and benefits of the developer program they are enrolled in.

3. Member (company/organization only)
Developers assigned the Member role have access to the resources and benefits of the developer program they are enrolled in.

Now that you know the rules. So if an “Admin” user goes to certificate creation page, the option is disabled.

Disabled option to generate certificate

The rule also means that the Admin user cannot download the certificates either. It is the responsibility of “Agent” to generate and download the certificate and share it with the team.

Download option is also disabled.

Generating Certificates
If you are logged in as an Agent the button in first image will be enabled. Click on it and APPLE will guide you through the process to generate the certificates. But remember you have to generate 2 certificates: Developer ID Application Certificate and Developer ID Installer Certificate (First time I tried, I missed out on generating Developer ID Installer Certificate). Developer ID Application Certificate is used for signing the application and Developer ID Installer Certificate is used for signing the installer. While you are at it make it a point to download Developer ID Intermediate Certificate. Without Developer ID Intermediate Certificate Gatekeeper wouldn’t allow your application to launch.

As mentioned earlier only an Agent can download the certificates. So it is the duty of agent to generate the certificate and share it with his team.