Installing CS5.5 Master Collection on OS X Lion

Installing Adobe CS5.5 Master Collection on OS X Lion and having the Installer hang? Here’s the solution. It isn’t pretty, but it works.

I had a terrible time installing Adobe CS5.5 on OS X Lion 10.7.2; it was the kind that makes you string together colorful phrases and aim them at Adobe. In theory one should be able to install on top of a prior installation. Then again, in theory communism works.

In short, the installer ran, accepted the serial number, authenticated my adobe id account, and offered me a number of packages to install, however when the grand moment came to install the applications, the progress bar never turned into a progress meter. The estimated completion time remained at “Calculating.” And the percentage complete remained at 0%. The only way out was Force Quit.

I should point out if you’re seeing authentication errors, and not a hang error, make sure you have the Java Runtime installed on Lion. Java doesn’t come with Lion by default (thanks for that, Apple). It’s a known issue to Adobe, and it’s discussed on the Apple forums.

Skip to solution…

More Symptoms — Is this familiar?


A failed install can manifest with some of the product installed, just not the application. For instance PDApp, AAM Updated Notified, LogTransport2, Setup, AAM Register Notifier, adobe_licutil, all will appear in the dash board.

The Adobe Setup Error.log will have nothing in it beyond the text “Performing Bootstrapping…”

::START TIMER:: [Total Timer]
CHECK: Single instance running
CHECK : Credentials
Load Deployment File
Create Required Folders
Assuming install mode
::START TIMER:: [Bootstrap]
Perform Bootstrapping …

If one opens Console and looks at the System Log Queries / All Messages, you might see this:

1/25/12 8:05:39.637 PM PDApp: CFURLCreateWithString was passed this invalid URL string: ‘/System/Library/Frameworks/’ (a file system
path instead of an URL string). The URL created will not work with most file URL functions. CFURLCreateWithFileSystemPath or CFURLC
reateWithFileSystemPathRelativeToBase should be used instead.

1/25/12 8:05:39.637 PM [0x0-0x25025].com.adobe.PDApp.setup: 2012-01-25 20:05:39.636 PDApp[389:60b] CFURLCreateWithString was passed
this invalid URL string: ‘/System/Library/Frameworks/’ (a file system path instead of an URL string). The URL created will not work
with most file URL functions. CFURLCreateWithFileSystemPath or CFURLCreateWithFileSystemPathRelativeToBase should be used instead.

Looking at the .log files in /Library/Logs/Adobe/Installed, you might see an Error DW020 or Error DW050. In reading In reading http://kb2.adobe.com/cps/902/cpsid_90243.html, I see that it says if there are no additional errors types (there weren’t)
 to see http://kb2.adobe.com/cps/844/cpsid_84451.html, which didn’t help either.

HOWEVER, at the end of the article it makes this observation: “These errors occur when the version of Flash Player that on your syst
em is newer than the version installed by the CS5.5 installer.”

Someone thread on http://forums.adobe.com/thread/856962 suggested the problem is Adobe AIR, which I noted was installed the m
oment I installed the Adobe Support Advisor to decipher Adobe log files, expose error messages, and make recommendations of support articles. Of course, it wasn’t.

Sometimes cleaning a bit appears to help, only to falsely get your hopes up. The installer may appear to run and then issue this:


Exit Code: 24
————————————– Summary ————————————–
– 0 fatal error(s), 65 error(s), 0 warning(s)
ERROR: DW001: Set payload cancelled status

ERROR: DW049: Payload {007A2A28-D6A8-4D91-9A2B-568FF8052215} has an action “install” but no resultState
… repeats dozens of times with different GUIDs …
ERROR: DW049: Payload {FECCB1BF-038D-41C2-861B-4560E7667005} has an action “install” but no resultState
ERROR: DW050: The following payload errors were found during install:
ERROR: DW050: – Adobe Player for Embedding 3.1: User cancelled installation
ERROR: DW001: User cancelled the operation
—————————————- ———————————————

For the record, I did not cancel the operation.

Checked http://kb2.adobe.com/cps/834/cpsid_83481.html, but Exit Code 24 wasn’t listed.

In looking at http://blogs.adobe.com/oobe/2010/04/cs5_desktop_product_subscripti.html, there is a comment by By Isaac O. Nwuju – 9:5
7 PM on February 1, 2011 that writes Error Code 24 in a response to Adobe thinking an Adobe product is already installed.

Other Mostly Useless References


I have read http://kb2.adobe.com/cps/905/cpsid_90508.html.

  • I am able to get to my ~/Library folder with no problems, that’s not the issue.
  • I do have the Java runtime installed:$ java -version
    java version “1.6.0_29”
    Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11M3527)
    Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
  • I am not seeing Crash Reporter delays
  • I am not having issue with opposite scroll behavior
  • I have no need to use Rosetta
  • My issue is one of installation, not product features, so autosave/restore/versioning/fullscreen/multi-touch are all non-issues.
  • As I can’t get any software installed, I don’t have a product specific issue.

I have read http://www.adobe.com/products/creativesuite/faq.html#lion-os and have downloaded and installed the latest Flash Player.


I have read http://kb2.adobe.com/cps/828/cpsid_82827.html and it was not helpful.

  • I am able to make it all the way past the Install Options screen.
  • The progress bar never computes an estimated time or disk space, and installation remains at 0%.
  • The installer does not report any conflicts, the cleaner tool does not report any other Adobe products, and the Support Advisor tool does not report any problems with the environment.
  • The hard disk has over 150GB of free space.
  • The OS meets the minimum requirements.
  • The Install _did_ initialize.
  • No other installer is running.
  • The file system is not case-sensitive, but is case-preserving.
  • I do have administrative rights.

I have read http://kb2.adobe.com/cps/844/cpsid_84451.html which was partially helpful…

Looking at PDApp.log, I see this error message:

Mon Jan 23 18:25:33 2012[WARN] LWANative – Error in mdbOpenSessionNoCreate 8

And also this later on:

Mon Jan 23 18:25:34 2012[INFO] LWANative – pwa_openSession Session key : 24A46193-DEC1-47E4-AE35-41B39D994CF7
Mon Jan 23 18:25:34 2012[ERROR] LWANative – OOBElib returned error: 34
1/23/2012 18:25:34.889 [INFO] DWA.Utils PWA closesession returned <result><session^gt;24A46193-DEC1-47E4-AE35-41B39D99 4CF7</session></r
esult>

Trial mode, as suggested by Adobe Tech Support, results in this:

1/23/2012 18:25:34.898 [INFO] DWA.StartWorkflow Appmanager size is 98285568 bytes after conversion
Mon Jan 23 18:25:34 2012[INFO] LWANative – pwa_openSession Session key : 655B1D34-154C-43DE-A070-52C639724FAE
Mon Jan 23 18:25:34 2012[ERROR] LWANative – OOBElib returned error: 47
1/23/2012 18:25:34.922 [WARN] DWA.Fetchserialnumber Fetch serial numbers returned nothing
1/23/2012 18:25:34.927 [INFO] DWA.Utils PWA closesession returned <result><session^gt;655B1D34-154C-43DE-A070-52C63972 4FAE></session></result>
Mon Jan 23 18:25:34 2012[ERROR] DWANative – Error in dwa_getInstalledPathOfPayload, pdbSession is NULL.

I can not find those error messages in the Installation launch log error table provided by Adobe at http://kb2.adobe.com/cps/834/cpsid_83481.html.

Based on any error from oobelib it appears the issue is the same – the serial number is not getting validated. This happens regardle
ss if I enter one or use trial mode. This may be because of the prior error that wasn’t able to create a session, which most likely
holds said serial number. That said, the installer does put a green check mark by the serial number when I type it in [correctly].

The article http://kb2.adobe.com/cps/828/cpsid_82828.html is useless, as I’m using the serial number off the box and the installer says it’s correct, taking me to the next screen.

The other error message appears in http://forums.adobe.com/message/4139645 — which suggests repairing disk permissions. I have, though no permission problems were found.

To summarize, I feel I’ve exhausted the online knowledge base looking for a solution.

Adobe Support


I ended up calling Adobe Support at 1-800-833-6687 and learned a few things.

They will try to spend no more than 10 minutes with you on the phone, opting to give you a time intensive task and call you back to check on things.

The initial call was frustrating and almost discouraged me from talking to them again. It boiled down to walking me through the novice steps, and then getting me to download the .dmg off their website in an attempt to blame the media.

When that didn’t work, coupled with sending them some log files and the level of detail above, I got someone who was willing to drag a supervisor into the call. I was told that because I had documented in my case file the details so well, that they were to be extra careful as there was a techie on the line. (This made me wonder if they watch out for “secret shoppers” who test technical support.)

When things really got bad, things escalated to level two support was conferenced in, which is apparently the last line of defense — but at that point I had developed the solution I’m sharing below.

Here’s how I solved it.

First, and I can not stress this enough, back up your machine. And by that, I don’t mean Time Machine only, but a bit-for-bit copy on an external drive using Carbon Copy Cloner or SuperDuper!. Or, clone the drive with Drive Genius. I strongly recommend running Disk Utility after booting an OS X Lion disc and doing a Repair Disk and a Repair Disk Permission before you start. No sense in backing up a corrupted volume.

Second, validate that your backup worked by booting from it using the Option key. Because if your bork things up, you’re going to need to restore from it, and better to learn about that now, not later. If you’re gonna skip this step, at least go read the humorous Tao of Backup before proceeding.

Finally, what I’m about to share worked for me on my installation; your result may vary, and I’m not responsible if it doesn’t work, you mess it up, nor will I be offering support. Hopefully, with the timid gone the geeks remain.

If you’ve got Adobe already installed


Make a copy of your plug0in directory. You find it by opening /Applications, find an app like Adobe Photoshop, and inside the folder that contains it, you’ll see something called Plug-ins. Copy this to somewhere safe.

If you can use Help / Deactivate… so that you don’t burn up a silver bullet and have to call Adobe Support, whose number is 1-800-833-6687, by the way.

You should be able to uninstall the Creative Suite by going to “/Applications/Utilities/Adobe Installers”, and finding an uninstaller.

Uninstalling with the big guns


You’ll want to obtain a copy of the Adobe Create Suite Cleaner Tool. Run it, and clear out CS3, CS4, and CS5-CS5.5.

Going nuclear on Adobe


Create a file called wipeAdobe.sh, put the following in it, and give it execute permissions with chmod u+x wipeAdobe.sh.


open /Applications/Utilities/Adobe\ AIR\ Uninstaller.app

sudo "/Volumes/Adobe Creative Suite Cleaner Tool/Adobe Creative Suite Cleaner Tool.app/Contents/MacOS/Adobe Creative Suite Cleaner Tool" --removeAll=CS3
sudo "/Volumes/Adobe Creative Suite Cleaner Tool/Adobe Creative Suite Cleaner Tool.app/Contents/MacOS/Adobe Creative Suite Cleaner Tool" --removeAll=CS4
sudo "/Volumes/Adobe Creative Suite Cleaner Tool/Adobe Creative Suite Cleaner Tool.app/Contents/MacOS/Adobe Creative Suite Cleaner Tool" --removeAll=CS5-CS5.5 --removeFP=1

cat ~/Adobe*.log

rm -rf ~/Adobe*.log

rm -rf ~/Library/Application\ Support/Adobe
sudo rm -rf ~/Library/Caches/Adobe
sudo rm -rf ~/Library/Caches/AdobeSupportAdvisor.*
sudo rm -rf ~/Library/Caches/com.adobe.air*
sudo rm -rf ~/Library/Caches/com.Adobe.Installers*
rm -rf ~/Library/Preferences/AdobeSupportAdvisor*
rm -rf ~/Library/Preferences/Macromedia/Flash\ Player
rm -rf ~/Library/Preferences/com.adobe*
sudo rm -rf ~/Library/Saved\ Application\ State/AdobeSupportAdvisor*
sudo rm -rf ~/Library/Saved\ Application\ State/com.adobe.*
sudo rm -rf ~/Library/Saved\ Application\ State/com.Adobe.*
rm -rf ~/Library/LaunchAgents/com.adobe*
sudo rm -rf ~/Applications/Adobe*
sudo rm -rf /Users/wls/Library/Application\ Support/CrashReporter/Adobe*
sudo rm -rf /private/var/db/receipts/com.adobe.*
sudo rm -rf /Applications/Adobe*
sudo rm -rf /Applications/Utilities/Adobe*
sudo rm -rf /Library/LaunchAgents/com.adobe*
sudo rm -rf /Library/Application Support/Adobe
sudo rm -rf /Library/Application Support/regid.1986-12.com.adobe
sudo rm -rf /Library/Frameworks/Adobe AIR.framework
sudo rm -rf /Library/Logs/Adobe
sudo rm -rf /Library/Logs/DiagnosticReports/Adobe*
sudo rm -rf /private/var/root/Library/Saved\ Application\ State/com.Adobe.Installers.AdobeCreativeSuiteCleanerTool.savedState
sudo rm -rf /private/var/root/Library/Caches/com.Adobe*

echo "Searching...."
sudo find /Library ~/Libary /private -print | grep -i adobe

rm -rf /tmp/asu*

ls /tmp

echo "Please reboot and consider reinstalling a fresh copy of Adobe Flash and Adobe AIR"

Now run it from Terminal: $ ./wipeAdobe.sh

The prep before the install


Seriously, reboot after doing the above nuclear clean.

Then, download the latest copy of Adobe Flash and install it.

Download the latest copy of Adobe AIR and install it.

And, just in case you need to analyze the log files, snag a copy of the Adobe Support Advisor, which will help you analyze the logs that appear at ~/Library/Logs/Adobe and /Library/Logs/Adobe.

Boot in Safe Mode


Finally, reboot the system, holding down Shift to boot into Safe Mode.

Login with an account that has Administrator rights. Note you do not need to make a new account, though it’s a last resort.

Because safe mode is not loading kernel extensions and clearing caches, you’ll going to find the system running rather slow. This is normal. Lauchpad is going to look abysmal.

Install the software

Now using your Disks, or a downloaded copy of the Adobe Creative Suite 5.5 Master Collection, install the software.

Enter the serial number, provide your Adobe ID, select your products, and press Next.

After everything installed, open an application like Photoshop, go to Help / Updates…

Quit the application.

Restoring the Plug-ins


Open up the application Plug-in directory as well as your saved Plug-in Copy. Copy over anything that’s not in the application’s Plug-in, making sure they end up in the same folders. Check them all. Do not over write any files or directories.

Restart the software and validate the plug-ins work. If they do, restart and log back in.

You’re done. Had you used Pixelmator or The Gimp, you’d have been photo editing rather than following this blog.

Files Gone on Drobo FS with OS X Lion? Get ’em back!

Using DroboFS and OSX Lion only to discover that your Drobo shares have no content!? Yikes! But fret not, you merely have a small corruption problem brought on by the firmware, and in moments you can force a rebuild of that database and all your files will be back safe, happy, and sound with no data loss. Here’s how.

I recently updated my DroboFS to firmware 1.2.0 and dashboard 2.0.3 when I switched to Lion, and while my volume mounted there was no data in it although the Drobo lights showed there was capacity, as did the Drobo Dashboard, and the health reports indicated everything was just fine.

I spoke with Drobo Tech Support that indicated this was a known problem they are actively addressing as high priority; the problem is with Lion and their firmware, and we can expect an updated firmware release.

What’s curious about this is that if one uses the Finder and mounts the Drobo drive with SMB, using smb://Drobo-FS/, the files are there. However afp://Drobo-FS.local/ and cifs://Drobo-FS.local/ mount but reveal nothing.

A detailed description of the problem is at the article entitled: “Missing” Data (AFP) and/or CNID DB Errors. This article then leads to a second one, but is only for the brave.

Using Dropbear (SSH) with Drobo FS to regenerate the AppleDB (CNID DB) has detailed steps for regenerating the apple database.

Walt’s More Verbose Directions

  1. Using the Drobo Dashboard login to your Drobo as Administrator.
  2. Unmount all shares.
  3. Under All Devices / Settings / Admin you’ll want to check the Enable DroboApps setting, which will mount a volume entitled DroboApps on your system.
  4. Download a copy of DropBear from the Drobo Apps page.
  5. Unzip this .zip file, resulting in instructions and a compressed dropbear.tgz file . Move the dropbear.tgz file to the root of the DroboApps directory.
  6. Restart the DroboFS by going to Capacity and Tools in the Dashboard, and selecting the Tools drop down on the right side, and selecting Restart. Or, just power off the unit physically for 20 seconds and then turn it back on.
  7. When Drobo restarts, go to the Dashboard and select All Devices / Settings… / Network. Note the IP address given to the device somewhere.
  8. From OS X’s Terminal enter the command ssh root@theIPaddressAbove
  9. The default password is root, unless you’ve used Dropbear before and followed the instructions within it.
  10. Enter the command ls /mnt/DroboFS/Shares to view a list of shares on the drive.
  11. Tech Support promises the following will not cause any data loss, but anytime you’re doing reconstruction you should always have a backup (if you don’t, question your backup policy), and double check before hitting return. For each share of yours listed above, enter the command: rm -r /mnt/DroboFS/Shares/yourShareNameHere/.AppleDB and press return. Note the period indicating it’s a hidden directory.
  12. Exit Terminal by entering exit.
  13. Using the Drobo Dashboard unmount all your shares, which should be just the DroboApps share at this point; this is under the All Devices / Shares and you just uncheck all the boxes.
  14. Restart the Drobo again (see above if you’ve already forgot how).
  15. And just as important restart any Macs connected to the Drobo.
  16. When the Drobo comes up, start the Dashboard, and test the mounts. They should be working.

Where’s my JDK?

Caught in the Java depreciation battle under OS 10.6 and can’t find where the Java Development Kit (JDK) now resides? Here’s a command that will tell you, allowing you to still use InteliJ and other IDEs on OS X.

There’s a lot going on with Java at the moment. Oracle acquires Sun, putting the language in squarely in hands that don’t inspire trust; the same thing happened with MySQL. Meanwhile, the Apache Software Foundation quits the Java SE/EE Executive Committee. And now Apple deprecates Java, and the reason doesn’t appear to be what you’d think.

Starting with OS X 10.6.3 update, developers got caught in the back lash. Things moved on the file system.

Upgrading IntelliJ, the IDE was asking me where my JDK was, as it certainly wasn’t where the software, or I, thought it should be.

You won’t find the location using /Applications/Utilities/Java Preferences.app.

But you can find it with some digging. Thanks to this developer release note from Apple, the following command from Terminal will spew out some XML.

$ /usr/libexec/java_home –xml

Find the dictionary section that has ‘x86_64’ in it, and you’ll find an entry that has a ‘JVMHomePath’ with something like:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

You want to provide this full path to the IDE as where the JDK lives.

It’s worth pointing out that Apple recommends that if you install any 3rd party JVMs they should be installed in /Library/Java/JavaVirtualMachines or ~/Library/Java/JavaVirtualMachines.

Uninstalling Intego Software

I’d rather eat an orange then brush my teeth with peppermint toothpaste than deal with cleaning up my system after using Intego’s software. If anything can bring the Windows reboot experience, coupled with the leaving of software cruft, to the Mac platform, this software does it in my opinion. Here’s how I finally got rid of it all. I hope.

I recently purchased a Mac bundle with software and it included software from Intego, consisting of the Personal Antispam and Personal Backup applications. I installed them, and from that point forward it was an experience I’ve regretted and have been trying to undo. Only now do I think I’ve made some progress toward that goal.

Frankly, I didn’t get what the backup software did for me over many of the free solutions out there, and while the personal antispam look intriguing, it was intrusive as well and I decided to fall back to Apple’s spam filter included in Mail.

Even if a product doesn’t make it into my main line of recommendations, I often will keep it around in the event I suddenly have use for it. This, for example, is how TypeIt4Me eventually won me over.

Intego went out of their way to annoy me straight from the start. How so? Every time I went to install a package from them, they felt the need to do what appeared to be a gratuitous reboot. It was like being on frickin’ Windows. And they had to install their own update manager, which had to take a glory spot in the menu bar. And it had to do updates, which required even more reboots. I was done with them at that point, but don’t even get me started on the subscription scheme that rode on top of the atrocity.

So I wrote to them asking them how to uninstall their software. Here’s the reply I got:

Proper removal of the software package requires using the Installer package located in your software bundle or disc. If you have manually attempted to remove the software, you will need to first, reinstall the software again, then use the same Installer package to properly remove the applications.

If you need to, you can re-download the installer for Internet Security Barrier X6 using the link below:

http://www.integodownload.com/en/isbx6.html

Open the installer and select to uninstall all software. Restart your computer.

Great, another reboot. Lucky for me, I hadn’t tried to go off on my own path, plus I had the original installation utility. I tried it, and it appeared to work.

Notice I said appeared?

One week later, LittleSnitch pops up and reports my system is spontaneously trying to access Intego’s update service for the very set of applications that, for all evidence I could tell, I removed and forgot about. Apparently, no so.

LittleSnitch also reveals it’s TaskManagerDaemon who’s trying to deal with Intego’s NetUpdate buried in /Library/Intego. Thank you LittleSnitch, curse you Intego.

Intego leaves cruft. Running cruft. Seems this isn’t new of them, according to Apple archives.

Part of the Mac culture is being a good citizen. In my opinion, I feel they aren’t.

After uninstalling the software in exactly the manner they prescribe, enter this this command at your terminal:
sudo find / -name Intego -print

I suspect you’ll develop a similar facial tick as it starts returning output after scanning your disk.

Go grab a root shell, you’re gonna wanna also wipe out:

  • /Library/Intego and everything below it.
  • /Library/Application Support/Intego and everything below it.
  • /Library/Preferences/Intego and everything below it.
  • /Users/wls/Library/Application Support/Intego and everything below it.

Oh, and you’ll want to Reboot as well.

…it’s not like I had other applications up or was doing anything important.

After the reboot, you’ll notice tons of console messages from launchd. Now you need to do this.
$ launchctl
launchd% remove com.intego.task.manager.notifier
launchd% remove com.intego.netupdate.agent
launchd% exit

And, you’ll need to remove some .plist files:
$ sudo rm -v /Library/LaunchAgents/*intego*
$ sudo rm -v /Library/LaunchDaemons/*intego*

And preferences, frameworks, keychains, and widgets:
$ sudo rm -vrf /Library/PreferencePanes/NetUpdate.prefPane
$ sudo rm -vrf /Library/Frameworks/IntegoiCalFramework.framework/
$ sudo rm -v /Library/Keychains/Intego.keychain
$ sudo rm -vrf /Library/Widgets/Intego\ Status.wdgt/

Reboot again.

UPDATE (12-Dec-2010): I’ve been in contact with Intego Support, support@intego.com, and they were kind enough to provide this extra information:

If there is anything left on your computer, you can remove it manually.

Can you please go into the following areas on the computer and delete any traces of Intego or VirusBarrier:

/Macintosh HD/Library/Intego
/Macintosh HD/Library/LaunchDaemons
/Macintosh HD/Library/LaunchAgents
/Macintosh HD/Applications
/Macintosh HD/Library/Preferences
/Macintosh HD/Library/Logs
/Macintosh HD/Library/Receipts
/Macintosh HD/Library/Startupitems
/Macintosh HD/Library/Widgets

Home Folder:

~/Library/Application Support
~/Library/Preferences

They were right, there’s logs, too.
$ sudo rm -rf /Library/Logs/NetUpdate/

Review: Walt gives Intego software installation TWO thumbs down. The reasons are obvious.

Competitors?

An opinion piece: are Apple and Microsoft competitors? This line of reasoning says no.

Who made the spoon that you used to eat your breakfast cereal this morning?

Every once in a while I’ll hear people talking about how Microsoft and Apple are competitors. As someone who’s technology agnostic, I don’t see the world in such shades of black and white. Here’s my reasoning as an outsider comparing the two.

Apple is a hardware company, their goal is selling as many units of whatever as possible, whether it be computers or mp3 players. With a focus on design and user experience, backwards compatibility takes a back seat to form and functionality. They excel at elegance and minimalism. They aim sharply at the home user. Disposability is ok. The next big thing is the future.

Microsoft is an operating system and business application vendor, their goal is to put that software on to as many pieces of hardware as possible. They are an industry leader in office applications and software development environments. They aim sharply at business and government. Backwards compatibility is highly important. They’d run on toasters if they could.

Is there overlap between the two? Sure, some. Is it a make or break difference? Not really, much is a matter of preference and familiarity.

I twitch anytime I hear someone say OS X is more “intuitive” than Windows; the word they’re looking for is consistent. Coarse application design is more similar, meaning once you get over the learning curve, subsequent new challenges have a ring of familiarity.

But more importantly, are the two environments mutually exclusive? Not at all. That’s why platform agnostics run both systems. Some things are just easier to do in some environments than others.

The operating systems wars and the phone wars are about luring people toward purchasing something from that camp. But look closer. MS-Office runs on OS X, and quite nicely. Safari and QuickTime run on Windows, and quite nicely. Once you’ve made the purchase of their crown jewel, the fighting appears to stop.

Users, on the whole, don’t care (and often don’t understand) about the underlying system. They just have a problem they want to solve, learn how to do it once and without change, and any tool that gets the job done will do.

Just like my spoon.

NTFS on OS X

Trying to write to an NTFS volume on OS X, and all you find are third party packages and complicated config file manipulations asking you to reboot? Do this….

Every once in a while someone brings over an external NTFS formatted drive and plugs it into my Mac to exchange some large data sets. While the Mac can easily read NTFS, it doesn’t appear to have the capability to write to that file system.

Appears is the operative phrase.

If you search for a solution in the open, you’ll find companies selling commercial products, drivers, and mounters. Some people have posted complicated looking instructions telling instructing you to mess with low level system files, that may or may not exist, ending in a full system reboot that typically solves the problem for that lone drive.

NTFS on OSXHere’s the generic no-software required solution.

First connect your NTFS drive to the Mac, it’ll mount with some name like “My Disk.”

Open a Terminal window and enter the command:
$ mount

The mount command will tell you what drives are listed. Find the one that has your drive name listed in it and copy the device name:
/dev/disk1s2 on /Volumes/My Disk (hfs, local, nodev, nosuid, journaled, noowners, mounted by me)

Now eject the drive, but don’t disconnect it from the machine.

Go manually create the directory (shown in bold above); this is where the mount point will be:
$ cd /Volumes
$ mkdir My\ Disk

NOTE: The backslash escapes the next character, in this case allowing a space in the directory name.

Now, mount the drive as read-write using this command:
$ sudo mount -o rw -t ntfs /dev/disk2s1 /Volumes/My\ Disk

Make sure that you’ve used the same device location you copied down the the prior steps.

At this point your drive should appear on the desktop, and you ought to be able to read and write to it just fine. No rebooting necessary!

Note that you can get to it from the Terminal as well:
$ cd /Volumes/My\ Disk
$ ls

Note that sometimes Finder may act a little wonky with timing problems and a huge file. Apparently the underlying Unix system has no problem. You can copy a big file to the drive:
$ rsync –progress SuperBigFile.zip /Volumes/My\ Disk

Or a whole directory:
$ rsync -r –progress LargeDeepDirectory /Volumes/My\ Disk

When done, make sure you are not running any programs that are accessing the drive or have their current directory set to the drive:
$ cd /Volumes

Then, eject the drive normally, or unmount it from the command line — your choice.
$ sudo umount /Volumes/My\ Disk

Full disclosure and warnings: This was tested on OS X 10.6.5, though support has been around to do this for a while. And, any time you’re doing something that deals with questionable file system access, make sure there’s nothing on the drive you don’t mind losing. Have a backup. There’s always a slight risk, but it’s very close to zero — why state all this? Because I assume no responsibility if something goes wrong.

Found: The Best iPhone Development Book So Far

Want to write your own iPhone applications but Objective-C, XCode, Interface Builder, and the steep learning curve of Cocoa getting in the way? Have I found the book for you.

Warning: long and geeky post follows — iPhone wanna-be developers, read on!

Beginning iPhone Development - Exploring the iPhone SDKI’ve found it, finally, the best iPhone development book so far! Read on to see why.

Fairly recently, I decided to turn my attention to native iPhone application development, but I found the arena a little sparse when it comes to what I’d call good documentation.

For some perspective, I’m a software developer of 20+ years with background in Unix and Windows; I’m very well versed in C, C++, C#, and Java, among a good number of other higher-level languages, having produced a number of enterprise applications.

You’d think that picking up Objective-C and the Cocoa Touch frameworks would be a fairly simple task. However, the moment you step foot into the pool, you’re get a cold shock at how much you don’t know and it can feel daunting enough to want to retract back to familiar territory.

Don’t give up. It is easy.

Looking forward into the unknown presents a much more gloomy impression than when you’ve taken a few steps and looked back to see just how far you’ve come and in such a short period of time.

Here’s what’s happening: The Apple Frameworks represent a large and mature collection of some impressive code. The closest experience I’ve felt to it, and this is admittedly a horrible analogy, is Ruby on Rails.

With Rails, there’s so much going on by convention that you have to sling very little code to get impressive things to happen. This makes it hard to understand: there is no code to trace.

Same way with the Apple Foundation classes that are based on NeXTSTEP — a lot is handled for you, and often in new ways you might not have thought about because of limitations of other platforms, so that very little code is required to do something quite impressive. The problem is figuring out what that code is you’re supposed to write, and more importantly how’d you know to go about doing that in the first place. Hint: knowing the Foundation Framework is important to understanding the Cocoa Touch Framework.

This leaves one in the lurch that the sample code appears rather sparse, and the framework documentation overwhelming, with little guidance on how all the pieces fit together into a simple, cohesive whole. The problem is all too common.

My biggest gripe with many frameworks, especially Java and it’s auto-generated documentation, is that all you’re really presented with is a list of method signatures with very little discussion about what they do, purpose and limits to the input values, discussions of side effects, the importance of call order, and so forth. With other languages, you’re lucky if you can find the header file to include or the library file to link against. It’s all just expected that you somehow know this, and that doesn’t work when you’re learning a framework, though it’s fine if you just need a reference.

Apple’s online documentation is certainly comprehensive, but the reality is you’re going to be watching videos and reading tons of documentation, picking up crumbs of useful bits as you go. The cohesive moment of comprehension will come, but it will be a long and slow ride. You want something faster.

If you’re learning Objective-C at the same time, the ride is extra bumpy, because not only are there just a few language extensions sitting on top of C, but the ObjC library is actually doing some clever work that you want to know about, and this has additional implications because there’s a lot of convention going on as well. Further obscuring things is the fact that, due to historical reasons, the terminology you are most likely already familiar with doesn’t map nicely. A nice look under the hood solves this. Objective-C isn’t just some new keywords, it’s new application behavior.

What’s Wrong With Other iPhone Books At The Moment
As of early 2009, you’re going to find few iPhone books out there. Most of what exists is for the hacked version of the iPhone, and while that may even sound useful, the tearing apart of the SDK is rough and incomplete, not to mention the implementation to call is painful. This just isn’t applicable to the real world constraints of native mode development.

Think you can get by with a slightly out of date copy of a Cocoa book? Think again. The UIKit framework is just different enough that your approach needs to be slightly different. Tight, efficient, resource management becomes very important.

Also, unless you already know and understand Interface Builder, it can be a hard time following along when your book doesn’t match your software version. Apple keeps modifying Interface Builder, making it better, but the changes can come across as so dramatic, interface-wise, that to the new comer it looks like a totally different application each revision. Once you “get it” the sweeping changes are cognitively transparent. The iPhone SDK includes, you guessed it, a new XCode and Interface Builder.

What few modern iPhone books there are out there jump straight into a technical feast of SDK details, leaving the reader with a learning curve that’s as vertical as a brick wall.

What’s needed is a book that introduces only what you need to know, when you need to know it, explaining tips and tricks along the way, delving into the philosophies of why things are the way they are, what the developers were thinking, how the frameworks are structured, what the conventions are, and when those conventions aren’t followed. And, instead of showing you the end solution all refactored into a neat package, take the long way, when needed, to introduce you to what’s going on and then evolve into the optimal solution.

I’ve Found Such A Book!
The book, by Apress, is called Beginning iPhone Development – Exploring the iPhone SDK by Dave Mark and Jeff LaMarche. This book is about the fundamental concepts you need to understand in order to make the frameworks do their magic.

Its tutorials are very well constructed, easy to follow, and are specifically designed to teach the framework in such a way as you understand what’s going on and learn to fish for yourself.

This is in stark contrast to substandard books that merely cover a framework’s capabilities with cut’n’paste examples that have little bearing to real applications. This alone gives is five out of five stars by my standards.

My only complaint is a minor nit that there are a small handful of typos, and unfortunately, they happen in the code examples. However, they’re glaring, and you won’t get tripped up by them. (For example, on page 85, the tutorial is about UIImage. And, UIImage appears four times in a six line sample. The first one, however, says “jmUIImage” and the indentation is off. It looks like a macro expansion, a note, or the mangled initials of one of the authors. The code won’t compile with it, and it’s obvious from context what it should be.) To me, this is forgivable. Especially since it’s rare.

Tagging 1430216263I want to show you something.

I have a habit of tagging my books when I find an exceptional piece of information that I haven’t found elsewhere. I give a book high marks if it earns somewhere between three to seven tags, as the majority of my collection never gets any tags. Tagging, for me, is not note taking — it’s rare event.

I think the picture speaks for itself.

For Example…
So, at this point, I present for my own edification and future reference, some of that tagged content. Who knows, maybe something you see here might just get you traction on the learning curve.

– In Objective-C, colons are a legal character of the method identifier, they are not syntactic sugar.
– Even though a number of macros translate to nothing, void, zero, or null under the hood, their presence provides important hinting for data types and method calls.
– The NIB’s File’s Owner is a place holder for the class that loaded the NIB file.
– The NIB’s First Responder is the object the user is currently interacting with.
– The application icon is a 57×57 .png file, see Info.plist’s Icon File.
– The iPhone specially optimizes .png files so this is the best format.
– Reset the iPhone Simulator by deleting its directory from ~/Library/Application Support
– You want to use @property (retain, nonatomic) as often as possible.
– Interface Builder uses your defined accessors to properties, which use retain; that means you do need to deallocate Interface Builder objects, even if you didn’t instantiate them.
– There are four control states on a control, often you want UIControlStateNormal.
– Learn to use retain/release, there is no garbage collecting on the iPhone.
– It’s better to init/release than using factory methods; factories use autorelease pools, and while this will work, it often keeps resources around longer than you intend — avoid autorelease pools.
– Hog too many resources, whether CPU or memory, and the phone will reboot.
– Everything from UIApplication on down will fire messages to Delegate objects at certain well-defined times, you need to learn what these times are and what messages are sent; it’s not just subclass avoidance.
– You can Option-Click on a class or interface name in XCode and go right to the documentation.
– You can press ESC to cause auto complete to happen immediately.
– Command-equal_sign will size a control to fit.
– When you’ve got a lot of control hierarchies going on, use the View Mode button to see them as a list.
– Scaling an image takes computational overhead, avoid if you can.
– Set the Alpha slider to 1.0 in order to optimize the drawing sequence, it skips looking at the underlying background and factoring it in — it applies to the image drawn.
– Also set the Opaque checkbox in order to optimize the drawing sequence, it skips drawing the underlying background for the parts where the image is transparent.
– The Tag control allows you to assign a numerical identifier to controls to locate them later.
– You need to handle the Did End on Exit event in order to make the keyboard go away.
– You may also need a huge, invisible, custom button as well to make the keyboard go away.
– In XCode, use Option-Command-up_arrow to toggle between a header and its source file.
– In the Interface Builder, move the cursor over a view and hold down Option to see how many pixels there are between the item and its superview.
– Option-dragging a control in Interface Builder makes a copy.
– Nifty buttons are actually stretchable images, and Apple has buried a ton of them free for your use in the UICatalog sample code on their site.
– There are three different ways to handle layouts when rotation happens: autosize, reposition, and view swapping.
– The rotation callback passes you the orientation the phone came from, you need to use other means to get the current orientation.
– If you want to use Core Graphics, for things like view transitions, you need to link the framework into your application.
– Some frameworks, like Core Graphics, have one version for the iPhone hardware and one version for the iPhone Simulator.
– If you use the correct parameters, XCode’s build process can play games with the path and always target the right framework (use Relative to Current SDK, and do not select Copy items).
– Right-click the Resources folder and use Add / Existing Frameworks… to do this process in a safe way.
– If a view isn’t shown, it’s superview is nil.

…there’s plenty more, but you get the idea. The book is jammed with all kinds of useful things to someone who is new to iPhone development. This presentation of material makes the learning curve very approachable.

And, once over that hurdle, all those other books that I said were problematic suddenly make a whole lot of sense.

This book is the best first step I’ve seen in the journey to writing iPhone applications. Period.

Walt gives “Beginning iPhone Development” two thumbs up, five stars our of five starts, and a head nod of appreciation to the authors. Well done, guys. Well done.

OS X Mail’s Strange Log Messages

A while back I installed a pretty neat Mail extension called MailTags, which was used to tag mail messages with additional information. Cool concept.

However, at the time the usage I was personally getting out of it didn’t warrant the price for the app, and I uninstalled the application after the trial period was over.

Unfortunately, things didn’t end there, because I kept getting repeated log messages like this when I looked at the console:

1/1/09 2:52:05 PM Mail[362] Cannot restore width of table column with identifier 24

It was really obvious (and annoying), as I use GeekTools to monitor my console on my desktop in order to keep a bird’s eye view on what’s happening in the background.

I found out that I was not the only other user having this problem, and the MailTags site had a solution invoked from the Terminal:

$ defaults delete com.apple.mail TableColumns

I’d done this before, but the problem resurfaced. Not sure why. And, doing it again seems to have fixed the problem, again. My log is back to normal.

Meanwhile, I discovered that that MailTags has a new version out, and perhaps I’ll give them a second chance.

I just tend to get worried when an extension appears to go deep, especially when we know Apple is about to revamp things with the next release of the OS, and cruft somehow got left behind before.

Invisible Drive on OS X

The hard drive icon on my OS X’s Finder was no longer appearing on my desktop; here’s how I fixed it.

I happened to sign on to my desktop Mac and noticed something very strange, the Harddisk icon was no longer on the desktop.

Other clever tricks for looking at the file systems showed the file was most certainly present, although Finder operations were treating the volume as if the hard disk was hidden or invisible. The drive was there when I used terminal and did $ ls -l /Volumes

Finder Preferences showed that icons should be shown, but just the drive icon wasn’t appearing.

Then I found this aritcle, which suggested firing up the Script Editor and running this script:

tell application “System Events”
set visible of disk “NameofDisk” to true
end tell
tell application “Finder” to quit
delay 1
tell application “Finder” to launch

I believe I got myself into trouble by accident when I did the last disk repair using Disk Warrior or Disk Utility. Somehow the operation marked the drive as invisible. Undoing it was as simple as asking the system to make it visible again.