Archive for March, 2011

Get your permissions right!

Wednesday, March 30th, 2011

Thought I’d post about this little developer experience because it was incredibly frustrating and not at all obvious. Maybe this will save someone else the headache that I’ve been through.

Background: When preparing an application for release on the Mac App Store, you code sign your application, then bundle it into an installer pkg which is also code signed (using either Xcode organizer or the productbuild command line tool). When the application is installed, it gets extracted from that .pkg file, the user runs it, and it checks for a Mac App Store receipt. If there’s no receipt, OS X checks to make sure that the application is signed correctly, then contacts the Mac App Store to get your receipt.

Problem: This would all work for me as advertised except that when the receipt check failed, OS X would complain that my application wasn’t code signed, and therefore wouldn’t contact the App Store to get the receipt. From a user’s perspective, the app would just fail to launch.

I’d followed all the instructions. I double- and triple-checked to make sure the application was signed before I built the .pkg file. I tried building the .pkg using both the Xcode organizer and productbuild – they both worked with no problems or error messages. Yet when the application came out of the .pkg file on the other end, it was always unsigned! I deleted all of my certificates, regenerated them, and redownloaded them from Apple’s developer site (several times). I checked every step along the way in my build process – they were all working. It was incredibly frustrating because the signed app went into the ‘black box’ of the .pkg file just fine, but came out on the other end without its code signature.

Solution: After tearing my hear out for a while, googling for answers, and checking the developer forums, I finally tracked down the solution. I had a single image file in my application’s resources that had its permissions set to 640 instead of 644, meaning that it was not readable by everyone. That threw the entire game off – apparently when the installer unpacked the .pkg file, it ran into this problem file and either stopped short of installing the code signature, or invalidated the signature.  Either way, the application it installed was useless.  Simply changing the permissions on that one tiff file fixed the problem I’d been fighting with for days.

Soooo….  If your app builds and runs fine UNTIL you package it, and then comes out unsigned on the other end, check the permissions on the resources in your application.  And Apple, please emit some kind of warning when hapless developers feed productbuild a file with the wrong permissions that’s gonna screw up the whole process.

Tip: There’s a really cool developer utility called Cong, written by Stephane Sudre.  It checks your application for all kinds of minor errors, from localization goofs in .strings files to incorrect Info.plist entries to missing files in your package.  I’ve contacted Stephane and checking file permissions is now on his To-Do list for Cong.  If you’re a developer, get a copy of Cong – a simple drag-and-drop could save you a lot of time and trouble!

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

MacUpdate Bundle: Two more days to save on App Tamer, Parallels, 1Password, and much more

Tuesday, March 29th, 2011

There are just two days left to purchase the MacUpdate Spring Bundle and save a bundle on App Tamer, Parallels Desktop, 1Password, Hands Off, DVD Remaster Pro, Mac DVDRipper, TehcTool Pro 5, and more.  You get 10 apps worth $367 for only $49.99 – it’s quite a deal if you’re interested in even two of them!

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

App Tamer 1.0.5 – Compatibility with Parallels and Lion

Monday, March 14th, 2011

This App Tamer update fixes compatibility issues with Parallels Desktop and the developer release of Mac OS 10.7 “Lion”:

In past versions, if you used App Tamer to pause Parallels Desktop, you’d get these annoying, 3-5 second pauses in mouse and keyboard input whenever Parallels stopped.  This was due to the way Parallels handled the mouse and keyboard.  App Tamer now only pauses the Parallels virtual machine processes and leaves the Parallels Desktop app running – that works around the issue and still cuts nearly all of the CPU use associated with Parallels.  Thanks to the excellent tech support folks at Parallels who helped us find this workaround!

In Mac OS 10.7, Safari is based on WebKit 2, which does more ‘sandboxing’ of web content.  It basically puts many tasks (like Flash plugins and JavaScript scripts) in separate processes.  App Tamer already handled this sort of thing adeptly, but in 10.7, downloads are also done by a separate process, and that broke App Tamer’s download checking.  This new release fixes that – if Safari is downloading something, App Tamer won’t stop it in the background even if AutoStop is turned on.

And finally, there are some new features and tweaks in version 1.0.5, as well.  The list of stopped processes at the top of the App Tamer window gets a new contextual menu.  This lets you easily turn AutoStop off for the selected process, or quit, force quit, or relaunch that app. Also, double-clicking an app in the list will activate it, and selecting it in the list will show it in the Details drawer so you can see more information about it.

If you’re already running App Tamer, you can get the new version using its “Check for Updates” command in the App Tamer menu.  Or you can hop over to http://www.stclairsoft.com/AppTamer and download it from there.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]