it may used too much stack space because recursion.
try this
- (void)randomInteger {
while (true) {
int count = arc4random_uniform(5000) + 5000;
NSString *countString = [NSString stringWithFormat:@"%i", count];
if([countString rangeOfString:@"0"].location != NSNotFound &&
[countString rangeOfString:@"1"].location != NSNotFound &&
[countString rangeOfString:@"2"].location != NSNotFound &&
[countString rangeOfString:@"3"].location != NSNotFound) {
score.text = countString;
break;
}
}
}