arc4random_uniform not available in Xcode 7.0 beta

2019-01-12 04:35发布

问题:

I'm trying to use arc4random_uniform in the Xcode build mentioned, but it seems to no longer be available:

An alt-click on the available functions show that they're declared in stdlib.h, which has them listed as follows:

It seems strange that its no longer available. This particular stdlib.h is within the iOS 9.0 simulator directory at usr/include/stdlib.h not sure if that helps or not.

I have the latest command line tools installed. Not sure what's going on. Any advice / help / fixes are much appreciated. Thanks in advance.

UPDATE

Seems to be an Xcode bug, references for which are:

  • 22275032
  • 22275176

回答1:

It seems to be still available (I have been using it in 7A176x, but on El Capitan), it is just not shown in the suggestions.