Print Xcode build phase output when run via fastlane
Asked Answered
M

3

6

I have a custom Run Script phase in my Xcode project that outputs some information: enter image description here



When I build the app via Xcode, I see the output of the script (Planning build, Building for debugging etc.):

enter image description here


However, when I build the project via `fastlane gym`, this output is not shown:

enter image description here

Is there any way I can make that output appear when run through fastlane as well?

Thanks

P.S. This post has gone through a couple of major edits while I realized the root cause better. Apologies for that.

Marlie answered 4/4, 2023 at 13:11 Comment(2)
How is SwiftLint involved? Your screen shots don't show it. Your words don't match your pictures.Sundog
Yeah, sorry. At first I wrote the post using Swiftlint, but then realized that the underlying issue is more generic. After that I edited the post. But forgot to remove all traces of swiftlint. Will remove now. Basically it's a problem with standard output from build script phases when xcodebuild is run from the command line.Marlie
E
0

I don't know if it will help, but have you tried adding -verbose to the xcodebuild command? You can see the explanation in man xcodebuild.

Eer answered 24/10, 2023 at 19:56 Comment(1)
It's not working unfortunately. But I found out that the problem is actually related to fastlane. The output in the screenshot is from it.Marlie
R
0

although not perfect, if you type "warning: Hello" you will see it in the log as a warning

echo "warning: Hello" 
Rhenium answered 7/3 at 16:8 Comment(0)
M
0

Add to your fastlan xcodebuild this parameter:

raw_buildlog: true
Marsipobranch answered 7/5 at 8:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.