-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Xcode Cloud #777
Comments
having the same issue
|
Thanks for your comments. I haven't used R.swift with Xcode Cloud, so I haven't seen this issue. |
SwiftLint was having a vaguely similar issue when running on Xcode cloud - perhaps some of their approach could be helpful realm/SwiftLint#4485 |
Hi! We also have an issue with Xcode Cloud Archive - iOS encountered a failure that caused the build to fail.
Any ways to fix it somehow? |
Maybe try to disable plugin validation, you could set custom build scripts and run |
@le-tyang @rist did you find a solution to the At first I had the same issue as @sacred0x01 but fixed it with @PChmiel's response, but now I get a
My project is pretty small, so I'll remove R.swift for now. But I've been a big fan for 6+ years so would love to be able to use it again. In truth, Xcode Cloud is a bit of a pain but it's more of a pain to set up GH Actions with Xcode Connect IMO. |
@ky1ejs , unfortunately, no :( We ended up replacing R.swift with SwiftGen as some of our packages are using SwiftGen as well. |
have the same issue with Xcode Cloud, waiting for some resolution |
Also have the same issue with Xcode Cloud
|
Was struggling getting RSwift working with XCode Cloud. Managed to get it working like that:
Xcode cloud will not moan anymore that the rswift executable cannot be part of the package and will archive the build successfully Check out Apple Doc: https://developer.apple.com/documentation/xcode/writing-custom-build-scripts |
@DonBaronFactory could you share |
I only use "ci_pre_xcodebuild" since Rswift just needs to generate the source files before compiling. The content is as follows:
My Build Phase Script looks like that:
|
@DonBaronFactory look like you are using not the latest version, which is works quite different than previous one |
I installed with SPM and when I try to check the version it just refers to "master"... tried updating too but doesn't seem to do nothing. I read though that SPM got a problem in XCode 14... dunno, but for now I'm just happy it works, independently of which version it is |
@Faktorealchik I fixed this issue by adding this to my
But then I do also face this error when using the SPM build tool plugin
Seems like since we cannot get sudo on Xcode cloud, we are not allowed to save new files ? |
Has anyone found a solution? I have the same error after changing |
Same issue here, and I'm importing Rswift using Package.swift instead of in Xcode project dependencies settings 🤔 2023-03-08T11:53:44.043893938Z WriteAuxiliaryFile /Volumes/workspace/DerivedData/Build/Intermediates.noindex/MainPackage.build/Debug-iphonesimulator/MainPackage.build/Script-8592293820177808654.sh (in target 'MainPackage' from project 'MainPackage')
2023-03-08T11:53:44.043944422Z cd /Volumes/workspace/repository/MainPackage
2023-03-08T11:53:44.044069113Z write-file /Volumes/workspace/DerivedData/Build/Intermediates.noindex/MainPackage.build/Debug-iphonesimulator/MainPackage.build/Script-8592293820177808654.sh
2023-03-08T11:53:44.044145671Z
2023-03-08T11:53:44.044264203Z PhaseScriptExecution R.swift\ generate\ resources\ for\ generic\ module\ MainPackage /Volumes/workspace/DerivedData/Build/Intermediates.noindex/MainPackage.build/Debug-iphonesimulator/MainPackage.build/Script-8592293820177808654.sh (in target 'MainPackage' from project 'MainPackage')
2023-03-08T11:53:44.044404876Z cd /Volumes/workspace/repository/MainPackage
2023-03-08T11:53:44.044517042Z /bin/sh -c /Volumes/workspace/DerivedData/Build/Intermediates.noindex/MainPackage.build/Debug-iphonesimulator/MainPackage.build/Script-8592293820177808654.sh
2023-03-08T11:53:44.044607100Z Error: You don’t have permission to save the file “R.generated.swift” in the folder “MainPack
2023-03-08T11:53:44.044724976Z age”.
2023-03-08T11:53:44.044811303Z Command PhaseScriptExecution failed with a nonzero exit code |
Hello, I am also experiencing the same issue. It is causing some inconvenience on my end as well. Have you found a solution to this problem or is there any progress on it?😩
|
Experiencing the same issue with a minimal project configured to run on Azure Pipelines
Added the plugin validation disable with no effect (at least on this specific error) |
I'm having the same issue with: On local machine is working without issues, also it works on Mac Studio, but the Azure pipeline fails with this error. Any solutions? |
Hello. Does anyone have found solution? Or waiting for R.swift compatibility? |
Hello, When I tried to change my CI script to rswift generate "$SRCROOT/Generated/R.generated.swift" --xcodeproj "$CI_PROJECT_FILE_PATH" --target "@CI_XCODE_SCHEME" it gave me the following error:
So obviously rswift does not work with workspaces and there is no way to get a project name from Xcode Cloud environment variables. Finally, I ended up with the following solution:
if [ -z ${CI+x} ] || [ "$CI" = false ]; then
"$SRCROOT/rswift" generate "$SRCROOT/Generated/R.generated.swift"
fi The one possible downside is that there might be merge conflicts but it is a minor one. |
Hello. Has anyone found a solution? |
Hi! Any news on the solution to this problem? |
@denis15yo I personally switched to Swiftgen and pre-generated the files manually (via command line) this means the build no longer depends on yet another tool, which I think is always a good thing. |
Thanks for the answer But in any case, I like the solution with buildTool plugins better, so I hope the problem will be solved someday) |
Please provide instructions to remove R.swift altogether. It's not worth breaking your build. After removing the r swift packages and build settings, I still get an error. There is no script. |
Hey! I am still experiencing the problem with Xcode Cloud, RswiftGenerateInternalResource is disabled, Xcode 15.0, Rswift 7.4.0. Is there maybe any updates on that? I am setting Rswift up with SPM, having 2 targets depending on it P.S. Now I see that error: Run command: 'cd /Volumes/workspace/repository/ci_scripts && /Volumes/workspace/repository/ci_scripts/ci_pre_xcodebuild.sh' |
Using R.Swift 7.4.0, I solved this by:
That way, you use the Build Tool Plugin on your development branch, and the manual inclusion method on the Xcode seems to be switching towards resources being available at build time (images, colours) more and more, which I can only say is a good thing, but RSwift and SwiftGen still remain decent for more legacy projects. |
Hi there,
We recently migrated to V7, and it works perfectly, in our local machine and CircleCI.
The issue now is with Xcode Cloud, as we are getting this error from logs.
Looks like the build script doesn't have access to
Resources
folder in Xcode cloud 🤔We've done everything as the migration guideline suggested.
Do you have any suggestion? 🤔
Thanks!
The text was updated successfully, but these errors were encountered: