When compiling XcodeGen on Linux distros using Swift 5.10.1 the compile will fail with the error:
/root/XcodeGen/.build/checkouts/XcodeProj/Sources/XcodeProj/Extensions/String+Utils.swift:25:31: error: ambiguous use of 'arc4random_uniform'
let randomValue = arc4random_uniform(UInt32(base.count))
Related XcodeGen issue: yonaskolb/XcodeGen#1495
I believe this error is being caused by the random number generator arc4random_uniform
and the pattern that overwrites it for linux distros
I propose the following fix: https://github.com/Howler4695/XcodeProj/blob/main/Sources/XcodeProj/Extensions/String%2BUtils.swift
I've tested it on my linux distros and it's fixed my issue and I haven't found any others arising from it. I'm not familiar with swift though so this fix could cause problems with older swift versions or something.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too