我尝试使用代码
-(bool)checIfWorksOnJailbreak;
{
NSString *s = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Info.plist"];
NSLog(@"%@",s);
if([[NSFileManager defaultManager] fileExistsAtPath:s]) {
NSDictionary *plistDictionary = (NSDictionary*)[NSKeyedUnarchiver unarchiveObjectWithFile:s];
NSString *valueString = [plistDictionary objectForKey:@"SigerIdentity"];
if([valueString isEqualToString:@"Apple OS Application Signing"])
return true;
else
return false;
}
return false;
}
它总是导致错误
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '*** -[NSKeyedUnarchiver initForReadingWithData:]:
incomprehensible archive version (-1)'
在线
NSDictionary *plistDictionary = (NSDictionary*)[NSKeyedUnarchiver unarchiveObjectWithFile:s];
欢迎任何评论