tuist / XcodeProj

📝 Read, update and write your Xcode projects
https://xcodeproj.tuist.io
MIT License
2.04k stars 313 forks source link

fix: error: ambiguous use of 'arc4random_uniform' on Linux distros #846

Closed Howler4695 closed 1 month ago

Howler4695 commented 3 months ago

Resolves https://github.com/tuist/XcodeProj/issues/845

Short description 📝

To fix bug when compiling xcodegen on linux distros using swift 5.10.1

Solution 📦

I got rid of the arc4random_uniform method and used the TYPE.random method (Int.random(in: 0..<base.count)

I also got rid of the overwrite on arc4random_uniform that would happen when linux distros were being used as the TYPE.random method works with linux distros

Implementation 👩‍💻👨‍💻