所以基本上我正在研究一個應用程序,其中一個功能是防破解功能。它檢查網頁上的設備的UDID號碼,如果它在那裏,它允許應用程序運行,如果它不在那裏,則運行exit(0);.到目前爲止,這就是我所擁有的。將NSString與網站上文本段落的一部分進行匹配。 - iPhone SDK
這是我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);
}
}
所以基本上,在那裏你看到
if ([[[UIDevice currentDevice] uniqueIdentifier] isEqualToString:[NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://example.com" ]]]) {
當它運行的是,它只能探測到的所有文本,而不是建立索引並找到該UDID號碼。所以我只能在那裏放置1個UDID號碼,因此會導致每個用戶的應用程序崩潰。我想設置它,這樣我就可以擁有儘可能多的東西,並且只需索引它並在頁面上搜索該UDID編號即可。有人可以幫我嗎?這很重要!
非常感謝!
嗨。 這對企業臨時應用程序很有用。 您是否找到丹尼爾的解決方案? 乾杯, Ompah – Ompah 2010-10-20 12:53:55