You could prevent noobish crackers from finding links to "SignerIdentity" in your code using ROT13 or a similar simple shading algorithm http://en.wikipedia.org/wiki/ROT13
After applying ROT13, "SignerIdentity" will become "FvtareVqragvgl".
In any case, the answer to your question (how do you get the size of the Info.plist file):
NSBundle *bundle = [NSBundle mainBundle]; NSString* bundlePath = [bundle bundlePath]; NSFileManager *fileManager = [NSFileManager defaultManager]; NSString* path = [NSString stringWithFormat:@"%@/Info.plist", bundlePath ]; NSDictionary *fileAttributes = [fileManager attributesOfItemAtPath:path error:NULL]; if (fileAttributes != nil) { NSNumber *fileSize; if (fileSize = [fileAttributes objectForKey:NSFileSize]) { NSLog(@"File size: %qi\n", [fileSize unsignedLongLongValue]); } }
Also keep in mind that the size (in bytes) of the Info.plist in the Xcode project directory and the Info.plist inside the package may be different. You probably want to build the game once, and then look at the size of <your app bundle.app>/Info.plist , and then update your anti-piracy code.
Julio GorgΓ© May 24 '09 at 1:46 pm 2009-05-24 13:46
source share