Hello, So basically I'm working on an application, and one of the features is an anti-cracking feature. It checks the webpage for the UDID number of the device, and if it is there, it allows the application to run, if it's not there, it runs exit(0);. So far, this is what I have.
This is in my AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[window addSubview:mainViewController.view];
if ([[[UIDevice currentDevice] uniqueIdentifier] isEqualToString:[NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://example.com" ]]]) {
NSLog(@"Match!");
[window makeKeyAndVisible];
}
else {
NSLog(@"No match.");
alertView = [[UIAlertView alloc] initWithTitle:@"Access denied!" message:@"You aren't using an official version of this application." delegate:self cancelButtonTitle:@"Okay" otherButtonTitles:nil];
[alertView show];
[alertView release];
}
return YES;
}
- (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0) {
exit(0);
}
}
And so basically, where you see
if ([[[UIDevice currentDevice] uniqueIdentifier] isEqualToString:[NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://example.com" ]]]) {
When it runs that, it can only detect all of the text, rather than indexing it and finding that UDID number. So I can only put 1 UDID number on there, therefore making every user's application crash. I want to set it up so that I can have as many things on there as I want, and it will just index it and search for that UDID number on the page. Can anybody help me please? It's very important!
Thank you very much!