Update: why is it you always find the solution after you post a work around? Anyway, you can patch both Intel and PPC based Dashcode apps using the information found at alex.clst.org

Dashcode has expired on time, but Leopard wasn't delivered on time, and now we're left for at least 3 more months without this excellent, free development environment.

Since Apple don't seem to be releasing another beta until Leopard is out it looks like we're forced to look to alternative methods of widget development. So, either someone needs to get in there and patch Dashcode around the expiry or you can use my script to get it going again.

NewCommand line for non-techies

I've published 37 videos for new developers, designers, UX, UI, product owners and anyone who needs to conquer the command line today.

Patch around the expiry

Sadly for the time being, I've not too familiar with Objective-C and developing for the Mac. However programs run on logic, so this is how far I've got:

  1. The date we're looking for is 2007-07-15
  2. I've run strings on the Dashcode package and grep'ed for the date to no avail
  3. It makes sense to think the expiry is being checked using two NSCalendarDate to compare and continue
  4. Running the ObjectAlloc app (/Developer/Applications/Performance Tools/) I can see the NSCalendarDate objects being created, and most importantly, can see one of the objects contains: 2007-07-15 00:00:00 +0100, and the other 'now'.
  5. Based on all of this, I have to assume the date is hardcoded in to either the binary or it's resources, therefore it can be changed - it just needs the year leaping forward.

Dashcode Memory Inspection

If anyone comes up with a patch or hack - that would be superb.

Using AppleScript to get around the expiry

I've managed to knock together a simple AppleScript that will reset the date, run Dashcode and then set the date back. The only prerequisite is that you set the date and time automatically via the Date & Time System Preference panel.

View the AppleScript in your Script Editor

set username to "YOURUSERNAME"
set passwd to "YOURPASSWORD"
set bypass_year to "2007"
set bypass_month to "05"
set bypass_day to "14"

set date_cmd to "date " & bypass_month & bypass_day & "`date +%H%M`" & bypass_year

-- set the date to allow Dashcode to open
do shell script date_cmd user name username password passwd with administrator privileges

tell application "Finder"
    run application "Dashcode"
end tell

tell application "System Preferences"
    -- forces a reset on the date
    set current pane to pane "Date & Time"
    quit "System Preferences"
end tell

tell application "Dashcode"
end tell

Want more?

Posts, web development learnings & insights, exclusive workshop and training discounts and more, direct to your inbox.

I won't send you any spam, and you can unsubscribe at any time. Powered by ConvertKit