Swift - arc4random not impemented?

the is no category for Swift, so i write in the main category.

the function arc4random is not accessable even if i import Foundation.

Does someone know why? Is it not implemented?


arc4random is a part of Darwin.C library and it is available only on macOS,
server side has Linux environment, in which Glibc library is used instead, so you have to consider using alternative PRNG. Unfortunately, there is no analogue to arc4random in Glibc, your best bet could be rand(), random(), *rand48() depending on your needs.