我们正在处理的应用程序被拒绝,因为审核过程中的设备被检测为越狱^^
为了检测越狱设备,进行了几次测试:
NSString* bundlePath = [[NSBundle mainBundle] bundlePath];
// scan for itunes metadata
BOOL isDirectory = NO;
NSString* directoryPath = [bundlePath stringByAppendingPathComponent:@"SC_Info/"];
BOOL directoryIsAvailable = [[NSFileManager defaultManager] fileExistsAtPath:directoryPath isDirectory:&isDirectory];
BOOL contentSeemsValid = ([[[NSFileManager defaultManager] contentsOfDirectoryAtPath:directoryPath error:NULL] count] == 2);
if (directoryIsAvailable && contentSeemsValid) {
return YES;
}
contentSeemsValid = [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/iTunesMetadata.?plist", bundlePath]];
if (contentSeemsValid) {
return YES;
}
// scan for cydia app
NSURL* testURL = [NSURL URLWithString:@"cydia://"];
if ([[UIApplication sharedApplication] canOpenURL:testURL]) {
return YES;
}
// scan …Run Code Online (Sandbox Code Playgroud)