Application Loader!

May 7, 2009

I was struggling quite a bit this morning with the application uploading interface on iTunes Connect.  It insisted that there was something wrong with my code signing, which I verified was not the case (using “codesign -vvvv AppName.app”).  Then I decided to try Application Loader.  applicationloaderMuch better!  Instead of a vague message about my code signature, it let me know that the icon I had was off by one pixel.

What’s also interesting to note here is that I had previously re-sized the icon to be the correct size (57×57), but I had not re-added it to the project.  Only after deleting it from the project and re-adding the new icon file was I able to upload the app successfully via the Application Loader.

I’m never using the web interface again!


Awesome Public Domain Imagery

May 6, 2009

It turns out, our government has a ton of public domain images available these days.

cool_nooa_imageThere is tons of cool stuff like this over at the NOAA Photo Library and the Fish and Widlife Service’s Digital Library System.

brown-trout-small


It’s a Keeper – Northeast v1.2

May 6, 2009

Thanks to some attentive feedback from another Doug in Massachusetts, we’ve updated the Northeast edition of It’s a Keeper to include a note about the special Spring Cod Conservation Zone. It's a Keeper - NortheastWe’ve also updated the Massachusetts Haddock regulations to reflect a recent length change. Version 1.2 should be out within a week.

Next is an update to the NY-NJ-DE edition, and hopefully soon we’ll have RI Fluke regs to publish!


Coming Soon…

May 6, 2009

It's a Keeper - Florida


Scythe 1.0

May 4, 2009

Well, it’s been a while since I mentioned that menulet I’ve been working on for use with Harvest.  I finally found the time to add a few visual tweaks and package it up into a DMG.  So, without further ado, I’m pleased to announce the beta version 1.0 release of Scythe!  Please go check it out and, if you’re a freelancing Harvest user, give it a shot!

Scythe 1.0


Leave those turtles alone!

May 4, 2009

They don’t screw around with turtle poachers in Florida:

The owner of the truck identified himself as Ramon Puente (DOB 8/1/65) of Miami.  Officers asked Puente if he had fish or other marine life in the cooler, and he said no.  As Sea Turtle Felony!officers were opening the cooler, Puente advised them he had caught a sea turtle and was going to take it to a rehabilitation facility.  Officers opened the cooler and found a live, endangered green sea turtle inside. Puente was charged with unlawful possession of a marine turtle, a third-degree felony.  He was booked into the TGK Correctional Center.

I would love to know what this guy was going to do with the turtle.  Do they eat them?  Do they sell them for use in some voodoo magic?  Whatever it is, I’m sure it’s not worth taking a felony for.

I found this while researching regulations for an upcoming “It’s a Keeper – Florida Edition”, which has been requested by phone and on the It’s a Keeper support forum.


Dr Nic’s ChocTop is a huge help for making Cocoa application DMGs

April 30, 2009

I released my first Cocoa application, a tiny little “menulet” that flips a bit to affect trackpad behavior on Mac laptops, a couple of months ago.  In buildng the DMG, I had to go through a bunch of trial and error to get the background image right.  I downloaded a couple of different DMG tools before I got what I wanted, and still I cannot remember how I did it.

This time around, I tried something new:  Dr Nic’s ChocTop.  I was skeptical at first because of my prior experience with creating DMGs, but this really is an excellent tool for packaging your Cocoa app.

ChocTop doesn’t try to hide hidden files below the fold or anything, so if you have your Finder set to show hidden files, you may want to change that:

defaults write com.apple.finder AppleShowAllFiles FALSE

killall Finder

Here’s my first DMG produced with ChocTop:
DMG produced with ChocTop


System Configuration Framework Reachability

April 30, 2009

While googling today, I couldn’t find a succinct explanation of this for a very common case: being notified of losing/gaining your network connection.  So I’m going to summarize a simple approach here.

If you’re not familiar with all of the SCReachability jargon, there are three important terms:

  • Reachability Target: The host you will test against to see if you can send data.
  • Reachability Callback: The function which will be invoked when your Reachability Target’s reachability changes.
  • Reachability Flags: A collection of bits that describe the reachability of a target.

Prior to 10.4, apparently the only way to check reachability was by polling a Reachability function.  That’s no longer “how we do, yo.”  Instead, the pattern is:

  1. Write a Reachability Callback.
  2. Create your Reachability Target.
  3. Register your Callback for your Target (SCNetworkReachabilitySetCallback).
  4. Schedule your Callback in your run loop (SCNetworkReachabilityScheduleWithRunLoop).
  5. Sit back and watch as your Reachability Callback is invoked when you unplug your network cable (or turn off your AirPort).

In your Callback, you’ll want to check the flags which are passed in.  Be sure you understand how these flags work.  It is not always intuitive (checking kSCNetworkFlagsReachable may not be sufficient for determing whether a host is reachable or not).

To get started, try running the SimpleReach sample app while plugging/un-plugging your network cable.

Finally, don’t forget to clean up your reachability target via SCNetworkReachabilityUnscheduleFromRunLoop and CFRelease.


Kingdom of the Crystal Skull returns in 2012 and we’re all gonna die or something!

April 29, 2009

From “The 2012 Apocalypse — And How to Stop It

Worse yet, the next period of intense solar activity is expected in 2012, and coincides with the presence of an unusually large hole in Earth’s geomagnetic shield. But the report received relatively little attention, perhaps because of 2012’s supernatural connotations. Mayan astronomers supposedly predicted that 2012 would mark the calamitous “birth of a new era.”


Three new things I’ve learned this week

April 23, 2009

I’ve been writing a lot of code lately, which means I’ve had no shortage of “learning opportunities” (or, as some people call them, bugs):

  1. Yesterday I enjoyed learning how to debug an autorelease pool using malloc_history.
  2. Monday I gained a deeper understanding of how Quartz strokes a path and why it would cause your rounded rectangles to become fuzzy at the corners (if you don’t account for the stroke width).
  3. Tuesday I discovered that keeping around a UITableViewCell for resizing calculations can be handy but error-prone.  Hint: if your table view is re-using cells, then your re-sizing calculation code better not depend on the cell’s contents remaining constant between calls.

Follow

Get every new post delivered to your Inbox.