iosxcodemacosshellxcodebuild

How to check whether xcodebuild succeeded in the post-action shell?


Is there any way to check if xcodebuild is successful in the post-action shell?
I want to run a custom script only when the build succeeds.

I checked env vars with the set command in the post-action shell, but couldn't find a suitable var.


Solution

  • In Xcode's post-action script, you don't have direct access to the exit status of the xcodebuild command.

    I not sure about this but you can check the existence of the generated build for example your app bundle. To infer whether the build succeeded.