Oh, I got hot sause all over my bazito!

You know what this is? It's a brain sucker. You know what it's doing? Filing its tax return

If you wish to make an apple pie from scratch, you must first invent apple pie

The Adventures of Little Ed Brave

Tell airport security your name is McCannister because you can hide anything in a cannister.

You know what? Nobody notices when this changes anyway.

There are 10 types of people in the world: Those who understand binary, and STFU

What happens in a black hole stays in a black hole

The black hole draws you inexorably inward. Time slows. You are likely to be eaten by a grue.

I'd diddle little umdidlie... if she weren't my half-sister.

Abortion prevents pedophilia. In more ways than one!
Get Firefox!
I wrote a haiku

which I was about to share,

but then I thought, "screw it."
Level 1

Notice to all users of the Holodeck:

There are safety protocols in place that cannot be deactivated without the approval of two commanding officers or the captain to protect users of the Holodeck from potential harm. However, every time the Holodeck is ever used in a nontrivial manner, no matter what the safety protocols say, the Holodeck turns into a deathtrap.

Unless you believe yourself to be adept at constructing a forcefield from your communicator and 19th century Earth tools, or you're at the very least not wearing a red shirt, you are strongly advised not to attempt to use the Holodeck until a designer comes up with a safety protocol that doesn't kill you whenever somebody looks at it funny. Even when you're not on the holodeck. Or in the same quadrant. Or time period.

In fact, if you are wearing a red shirt, Starfleet may not be the job for you

« LimbofemenistWe the people... are not qualified for the job »

Advanced Code Signing FTW; Also Apple Sucks

Permalink 09/25/09 at 08:20:58 pm, by Ed, 501 words   English (US)
Categories: Work, Programming

This may not be pertinent to anybody who reads this, but it seems like something I need to share, so that the other two people on the planet who are in similar situations may come across this answer.

Here's the premise:

The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate

Now, if you're an iPhone developer, you know what this means. It means Apple sucks at getting their shit together. 99% of the time, you've followed the instructions, but the instructions were wanting, and we only wish the error messages were just as bad, but they are essentially non-existent.

There are about a hundred and one ways to get that error message, but apparently nobody else has experienced my particular method yet. After going through several options, I eventually used the application update utility, which gave me a slightly more useful message:

Application failed codesign verification. Please see the console log for additional details

Essentially saying the same thing in different words, but huzzah, we can have somewhere to look for additional details!

After five minutes of finding the console log, I found this gem:

ApplicationLoader[800654]: A sealed resource is missing or invalid

And from there I found out about the codesign utility, which can actually give me a real answer! So, I run the codesign verifier on the app:

codesign -vv helloworld.app
helloworld.app valid on disk

When you upload to the app store, you have to zip your app. I unzipped the file I was uploading and tried it there, and that's the breakthrough I got:

codesign -vv helloworld_unzipped.app
helloworld_unzipped.app /Users/mac1/helloworld_unzipped.app/._order.plist sealed resource is missing

Ahah! Finally, a real filename! But... wait. I don't even have that file in my project! Why is it looking for it? And what's more, why does it say it's fine at first, then I zip it and then unzip it and it's broken!?

Well! I included a certain directory and all of its contents because I want the app to automatically include any new files without changing the project. There was apparently this hidden file in there as well, ._order.plist, which I wasn't even using in the project, and wasn't used anywhere at all, in fact. And also, XCode, Apple's Objective-C IDE, included it as a resource for the project. And also, that particular file is not included when zipping up directories. And also, then unzipping it and doing a diff on the two directories gives no difference, because it ignores hidden files by default. And also, there's a hash of the exact contents of each file and if one of those files is not extant or doesn't have the correct hash, then it's suddenly an invalid application.

So, this all adds up to about 8 hours of work to delete a single file and recompile the application, and suddenly it works!

And that's why I didn't get much work done today.


Comment from: Me [Visitor]
Seems like there should be some place one could get answers faster than having to figure out everything "from scratch", since no one has to invent Apple Pie these days....heh
10/05/09 @ 01:05
Comment from: Ed [Member]
You'd think so, and I already tried THE INTERNET, but that wasn't helpful, so I didn't know where else to look.
10/05/09 @ 06:51
Comment from: Joe [Visitor] · http://jowmarty.mediacoop.org
Did you try calling Apple? They probably could have just told you the answer... hehe. But look how good you are at puzzle-solving! Sometimes I wonder how healthy it is to get so good at critical thinking though... there seem to be a lot of people who are far too good at the "critical" part, on some message boards and chat rooms these days :)
10/05/09 @ 09:04

Comments are closed for this post.