Archive for July, 2007

WWDC 2007 session videos are out

Monday, July 30th, 2007

If you attended WWDC, you can head over to ADC on iTunes and see what you missed.

270,000 iPhones sold in first two days—not

Wednesday, July 25th, 2007

UPDATE 17:05 PDT: My theories have been disproven by my sharp commenters. See the comments for the true explanation. Thanks, guys!

Quoth the DFLL:

Apple Reports Third Quarter Results 

270,000 iPhones sold in the first two days, and Jobs is quoted in the PR saying “we hope to sell our one-millionth iPhone by the end of its first full quarter of sales”.


Here’s what Apple’s unaudited summary data (linked from that press release) says:

Q2 2007 Q3 2006 Q3 2007
Units K Rev $M Units K Rev $M Units K Rev $M
iPhone and Related Products and Services (6) - - - - 270 5

So they sold 270,000 of “iPhone and Related Products and Services”. Suppose that all of those are $499 (which we know is false):

499 × 270,000 = 134,730,000

$134M! That’s a long way from $5M.

The explanation is in that footnote 6:

(6) Consists of iPhones and Apple-branded and third-party iPhone accessories.

So if you bought an iPhone and a case, you effectively bought two iPhones for the purpose of that column. More accurately, you bought an iPhone (+1) and a Related Product (+1), for a total of +2.

I suspect the real number of iPhones, not counting accessories, is much, much closer to AT&T’s 146,000-activations number (since very few people will buy an iPhone and not activate it).

Reddit and Digg compared

Tuesday, July 24th, 2007

Parallel coverage of this hoax on the two sites.

The titles:

The comments (summarized):

  • Reddit: It’s fake. You can tell because the frame shown in the “screenshot” doesn’t appear anywhere in the actual YouTube question.
  • Digg: This was really really funny and the candidates deserved it, but it embarrassed the internet on national TV, and CNN will never do a debate like this again because of it. BTW, it’s fake.

The scores:

  • Reddit: +179-132=47 (and dropping)
  • Digg: 2510 (and climbing)

UPDATE 2007-07-25:: See Simone’s rebuttal in the comments.

An easy application to turn off applications’ Dock tiles

Tuesday, July 24th, 2007

I just released an application called Configure Application Dock Tile. The purpose of this app is to make it easy to turn an app’s Dock tile off or on.

I first had the idea when making some screencasts (including the Adium screencasts). Normally, iShowU shows up in the Dock, and I don’t like having that artifact in the screencast; I find it distracting. So I wrote this app to make it easy for me to turn off the Dock tile in future versions of iShowU.

(If you downloaded this earlier today, please do re-download it, as I overhauled the user interface. That’s why this post disappeared in the meantime.)

How to make your app’s Dock tile highlight

Monday, July 23rd, 2007

So, no matter what you do, your Dock tile doesn’t highlight when you drag a document onto it. You’ve hexadecuple-checked your CFBundleDocumentTypes list, and everything looks correct, but Dock is not co-operating and you just want to kick it.

Finally, you decide to remove the LSItemContentTypes key, and it works just fine! How can this be?

Well, since Tiger, LSItemContentTypes shuts out all the other document-type tag keys. Your CFBundleTypeOSTypes, your CFBundleTypeExtensions—all of those are ignored when LSItemContentTypes is present; it looks at nothing but the LSItemContentTypes list. Taking out LSItemContentTypes forces LS to look at your OSTypes and extensions lists instead.

More to the point, your problem is that the set of UTIs you’ve specified does not contain the UTI of the would-be document that you’re dragging.

You could be forgiven for expecting that having in your set of UTIs would allow you to open applications as your documents. This is not true, because a standardly-constructed Mac OS X application is of type That type does conform to, but it is not equal to, so the Dock refuses your drag with a dismissive wave of its kerchief bundle and an AIFF file of a sharp “hmph!”.

So how do you find out the true UTI of your document?

The easy way is mdls. Ask for the kMDItemContentType property:

% mdls -name kMDItemContentType -------------
kMDItemContentType = ""

But this only works on a volume with a Spotlight index; for example, it doesn’t work on disk images or RAM disks (same thing). Another way is Nicholas Riley’s launch, with its -f option:

% launch -f Mac OS X application package 
        type: 'APPL'    creator: …
        architecture: PowerPC, Intel 80x86
        bundle ID: …
        version: …
        kind: Application
        content type ID:
        contents: 1 item
        created: 2007-07-23 07:12:31
        modified: 2007-07-23 07:12:31
        accessed: 2007-07-23 07:12:41 [only updated by Mac OS X]
        backed up: 1903-12-31 17:00:00

Either way, put that UTI into your list. Then drags will work.

In summary, the Dock checks for equality of the prospective document’s UTI to the UTIs listed under LSItemContentTypes, not conformity. You need to list every UTI you support in your Info.plist, including those that conform to the ones you expect. It’s either that or give up on UTIs entirely.

(Summary suggested by wootest.)

UPDATE 08:44: ssp suggested mdls instead of launch.

Report-an-Apple-Bug Friday! 66

Friday, July 20th, 2007

This bug is File type of GIF files in UTI list is incorrect. It was filed on 2007-07-01 at 18:18 PDT.


Free stuff on iTunes: TV edition

Wednesday, July 18th, 2007

Turns out that the iTunes Store has a complete list of all free TV episodes—more complete than the list of free stuff on iTunes that you can have on the main store page.

Still no free movies, though.

Adium GSoC podcast!

Tuesday, July 10th, 2007

This hasn’t gotten anywhere near the traction that I think it deserves, so I’m announcing it here too: We’ve done a podcast!

While we were supposed to be attending WWDC, Colin, David, and I played hooky and went down to the Googleplex to record an episode of the Google Summer of Code podcast. The podcast is hosted by Leslie Hawthorn, who runs the GSoC program. Adium participated last year and is participating again this year.

The episode, which is available from the GSoC blog post, is very funny and gives a bit of insight into how we run our open-source project.

It’s a little over 20 minutes of advice and programmer hilarity. Check it out. ☺

Apple Bug Friday! 65

Friday, July 6th, 2007

This bug is kIconServicesUpdateIfNeededFlag not documented. It was filed on 2007-05-25 at 02:02 PDT.


Apple Bug Friday! 64

Friday, July 6th, 2007

This bug is kIconServicesNoBadgeFlag not documented. It was filed on 2007-05-25 at 02:00 PDT.


I’ve been hotlinked!

Thursday, July 5th, 2007

So I was looking through my referers for June and noticed this row:

# Hits Referrer
4 671 1.17%

Grepping the raw logs turned up lines like this one: ☃☃.☃☃.☃☃☃.☃☃☃ - - [31/May/2007:06:01:11 +0000] "GET /plusminus/minus-8.png HTTP/1.1" 200 75 "" "Mozilla/5.0 (Windows; U; Windows NT 5.0; pl; rv: Gecko/20070309 Firefox/"

I’ve been hotlinked!

I always love it when people like and use my stuff, but in this case, it’s taking out of my bandwidth allowance. Not by much—those 671 hits add up to a whopping 50 K for the month (thanks, SuperPNG!)—but that’s not the point. This sort of thing is generally not kosher.

I wonder how goatse looks at 8×8 pixels…

Nah, I’m not that evil. Here’s what I’ve made to swap it out with:

An animated GIF that says “HOTLINKED!”

On the other hand, the img element on the hotlinking page doesn’t have a width and height, so I could always use a much bigger image. Perhaps 8.5×11″.

But I haven’t done either of those yet. I’ll give them a chance to save themselves first, by emailing them and asking them nicely to host the image themselves.

I’ll let you know what happens. ☺

UPDATE 21:47: I just sent them (I hope) this message via their contact form:

I noticed that you’re using the minus icon I created on your internationalization page:

That’s cool; I’m glad it’s finding use. However, I do ask that you host the image yourself, rather than linking to it on my site.

I say “I hope” because I can’t read Polish. Here’s the form’s response:

Wiadomosc została wysłana. Dziękujemy.
Kliknij TUTAJ aby przejsc do strony głównej

So, I hope that worked. I’ll check back in a week and see.

UPDATE 2007-07-24: OK, a bit late, but I just checked. They’re no longer hotlinking, which is good, but they’re also no longer using the minus icon at all. Ah, well.

Code signing: Not as new as you think

Tuesday, July 3rd, 2007

Code signing is new in Leopard, right?


No, actually; it’s much older, as I found out while responding to a question on programming.reddit. In my results for a Google search that I did, I stumbled over a link to TN1176, which mentions the addition of code signing.

TN1176 is the release notes for Mac OS 9.

The technote doesn’t actually say much. In fact, I can go ahead and quote it in full:

Apple Code Signing is a new technology in Mac OS 9
that allows applications, plug-ins, and content to be
signed by developers. Apple Code Signing Certificates
assure your customers of your identity and the integrity
of your products. For more information, please see the
Mac OS Security and Cryptography Web

That site’s gone now, of course. Fortunately, the Wayback Machine saved a copy.

Screenshot of the icon for
Apple Verifier

Screenshot of the icon for
Apple Signer

The top link on that page is to the Security 2.0 SDK, which includes a lot of stuff relating to code signing. There’s a pair of utilities called Apple Signer and Apple Verifier, some API documentation, some sample code, some resource templates (remember those?), a library, and the debugging root certificate.

UPDATE 06:29: Apple Verifier actually comes with the OS, but Apple Signer is only available in the SDK.

If you’ve ever seen a 'sign' resource while hacking in ResEdit, now you know what it was.

Meet the new boss
Same as the old boss

Oh, and in case you’re wondering what the Signer and Verifier applications look like:

This screenshot shows Apple Signer generating a signature for the SDK archive.
Signer at work.

This screenshot shows Apple Signer verifying the same signature.
Signer can also verify.

This screenshot shows the result of Apple Signer's verification of the signature.
Result of verification.

This is a screenshot of the Apple Signer window that shows the contents of a certificate.Same window, but for a root certificate.
These are the certificates from the verification. The root cert is the “Issuer’s Certificate” for the other one.

This screenshot is of a dialog box that says “That application or control panel is not supported by Classic”.
This is why I didn’t explain the difference between Apple Signer’s Verify command and Apple Verifier: I don’t know, because this message comes up when I try to launch Apple Verifier. And no, I don’t know why the message comes up.

Blog spam count: 2007-06

Sunday, July 1st, 2007

Spam comments blocked by Negative Turing Test in June 2007: