NSString *stko = [NSString
stringWithFormat:@"https://myserver.com/getstring.php"];
NSData *dataf;
dataf = [NSData dataWithContentsOfURL:[NSURL URLWithString:stko ]];
NSString * serverOutputg= [[NSString alloc]initWithData:dataf
encoding:NSASCIIStringEncoding];
if ([serverOutputg isEqualToString:@"teststring"]) {
[flurry logevent:@"ifentered"];
}
How is it possible for someone to get inside the if, after an the app is compiled?, What happened to me is this: someone using the app managed to get inside the if, but the server never sent the string needed and also according to my analytics at the moment the if was performed i dind't received any call on the php, so to do that someone must have seen what string they need to make the server return to be able to perform the method, also the code always worked great with this exception and it was connected to the internet as i received the logevent call. Please help me out I've been 4 days trying to work on this and haven't found any logical solution. Thanks
The other thing is that to enter the if it must match the string but How they knew what the string was, because the string isn't even on the php. Is there someway to see the code on compiled IOS Apps? because as far as i know is not possible and i can't find any docs about that.
Edit: According to @matt answer the Literal strings could be easily found and i agree with that so what could i do on the method to perform the operation: the if just turn a bool to true so what method of connection to my server to get a yes or no that could be harder to hack should be used?