小编Zee*_*eek的帖子

Apple拒绝越狱检测应用程序

我们正在处理的应用程序被拒绝,因为审核过程中的设备被检测为越狱^^

为了检测越狱设备,进行了几次测试:

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)

objective-c jailbreak app-store ios

7
推荐指数
1
解决办法
3611
查看次数

标签 统计

app-store ×1

ios ×1

jailbreak ×1

objective-c ×1