Yes, as you rightly point out, the bias doesn't need to be introduced. This is a well known issue with divisions(modulo) in generating random numbers. This is literally why there is an injunction for people not to create their own crypto.
Of course, the meeaning isn't that people aren't to work on crypto but that people shouldn't create RNGs like this thinking they are better than the prior-art, when they actually regress with already solved probems.
This is the exact different between arc4random() and arc4random_uniform().
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.
Unfortunately when I google for
ios random number The
very first return says
We can use the C function rand() for this:
int i = rand()%10+1;