Your code should work rather good if [deck.cards count] < 40000 but following is better
for (int i = [deck.cards count] - 1; i > 0 ; i--) {
int randomInt1 = arc4random_uniform(i + 1);
[deck.cards exchangeObjectAtIndex:randomInt1 withObjectAtIndex:i];
}
from docs:
arc4random_uniform() will return a uniformly distributed random number less than upper_bound. arc4random_uniform() is recommended over constructions like ``arc4random() % upper_bound'' as it avoids "modulo bias" when the upper bound is not a power of two.