mac-cain13 / R.swift

Strong typed, autocompleted resources like images, fonts and segues in Swift projects
MIT License
9.49k stars 763 forks source link

Fix unable to build using Xcode Cloud #879

Closed Keitaro0226 closed 7 months ago

Keitaro0226 commented 8 months ago

Fixes https://github.com/mac-cain13/R.swift/issues/862

The RswiftCore implementation can be found at try contents.write(to: outputURL, atomically: true, encoding: .utf8) is used to write the generated code; if atomically is true, the content is written to an intermediate file and then moved to the outputURL. However, XocdeCloud does not seem to allow writing outside of the pluginWorkDirectory, even for temporary files created by the Foundation framework.

The easiest way to make Build succeed on Xcode Cloud seems to be to change "atomically" to false.

What do you think about changing it?

References https://github.com/liamnichols/xcstrings-tool/pull/36

https://zenn.dev/hiragram/articles/49f178b58a36bc (Written in Japanese)

ryancstack commented 8 months ago

Hey @tomlokhorst is this something we could support? Would be great to have this working in Xcode cloud

piotrtobolski commented 8 months ago

@tomlokhorst can this be merged?

tomlokhorst commented 7 months ago

This is a great fix, thanks @Keitaro0226!

This is released in 7.5.0

MostafaMahmoud972 commented 6 months ago

i still get “RswiftGenerateInternalResources” is disabled even in release number 7.5.0 @tomlokhorst