#include <sys/mount.h> struct statfs buf; statfs("/", &buf); NSLog(@"%s", buf.f_mntfromname); char* prefix = "com.apple.os.update-"; if(strstr(buf.f_mntfromname, prefix)) { NSLog(@"未越狱, 设备唯一识别码=%s", buf.f_mntfromname+strlen(prefix)); } else { NSLog(@"已越狱, 没有设备唯一识别码"); }
原文链接 One code signing issue I commonly see, both here on DevForums and in my Day Job™ with DTS, is that the codesign command fails with errSecInternalComponent. This issue crops up in a wide variety of circumstances and the correct fix depends on the specific problem. This post is my attempt to clarify the potential causes of this error and help folks resolve it. If you have any questions or comments about this, please start a new thread, tagging it with Code Signing so that I see it. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" Resolving errSecInternalComponent errors during code signing In some circumstances the codesign command might fail with the error errSecInternalComponent. For example: % codesign -s "Apple Development" "MyTrue" MyTrue: errSecInternalComponent This typically affects folks who are signing code in a nonstandard environm...
评论
发表评论