Re: Checksum of App/NIB
Re: Checksum of App/NIB
- Subject: Re: Checksum of App/NIB
- From: Itrat Khan <email@hidden>
- Date: Sat, 3 Aug 2002 16:39:18 -0400
On Saturday, August 3, 2002, at 02:58 PM, Charles Srstka wrote:
On Saturday, August 3, 2002, at 10:28 AM, Itrat Khan wrote:
Your best bet is to load the desired nib file using NSFileWrapper and
checksum the resulting NSData representation. To get the nib file, you
can either hard-code it using NSBundle's pathForResource:@"mynib"
ofType:@"nib" or use NSDirectoryEnumerator to search for all files in
your application directory with a .nib extension.
Don't do this!
I tried that not long ago, and it turns out that if the path to the app
changed, so did the data returned by -[NSFileWrapper
serializedRepresentation]. So the app would work just fine in my build
folder, but when I sent it to anyone else, the path it ended up in
would not be the same, and they would get a checksum mismatch.
The NSFileWrapper approach does work; also, an NSFileWrapper doesn't
record path information for its represented file. If you used
NSFileWrapper to checksum a .app directory though, that's a bit
different than handling a .nib file wrapper.
Cheers,
Itrat.
............................................................
Modeless Software, Inc.
London, Ontario (Canada)
Tel: +1 519 473 2037
Web: www.modeless.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.