A random number with 6 digits would be:
int number = arc4random_uniform(1000000);
But that gives a number from 0 to 999,999. It sounds like you want a random number from 100,000 to 999,999. So do this:
int number = arc4random_uniform(900000) + 100000;