How to detect a cracked iPhone App and a jailbroken device (different methods)

前端 未结 2 1076
时光说笑
时光说笑 2021-01-31 00:51

I\'m building a blacklisting service for cracked iPhone apps and I am curious if I missed a method for detecting cracked apps.

In the moment following app crack detectio

2条回答
  •  [愿得一人]
    2021-01-31 01:06

    NEVER try and block jailbroken devices from using your app, just cracked ones. If you block jailbroken devices they'll be forced to use a patched version with all the checks removed.
    Also ALL my devices are jailbroken so if a developer blocks jailbroken devices I would have to ignore their apps. Over 10% of all iDevices are jailbroken so this is a very bad idea.

    EDIT: As I'm getting lots of down votes for this I'll post some methods to detect a jailbreak.

    - (BOOL)fileExistsAtPath:(NSString *)path{
        NSLog(@"Check if file '%@' exists", path);
    
        struct stat buffer;   
        return stat([path UTF8String], &buffer) == 0;
    }
    
    - (BOOL)jailbroken{
        return ([self fileExistsAtPath:@"/Applications/Cydia.app"]);
    }
    

提交回复
热议问题