XcodeGen icon indicating copy to clipboard operation
XcodeGen copied to clipboard

XcodeGen stops generating schemes when using 'preAction' in a project with lots of schemes

Open arkonxu opened this issue 2 years ago • 1 comments

Problem Description

My application has over 150 schemes, and I'm attempting to run XcodeGen as a "preAction" in a scheme to simplify the project file to include only the necessary files. Each scheme is targeted for a different client, and each client has their own set of files for customizing the app's appearance. Originally, I had these files in different targets, but due to performance issues in Xcode, I want to keep the project file as lightweight as possible.

The issue is that when running a scheme, in most cases, XcodeGen stops before completing the project generation, and only a few schemes are actually created. I've logged the output to a log file, and all it shows is:

⚙️  Generating plists...
⚙️  Generating project...
⚙️  Writing project...

Additional Information

  • XcodeGen Version: 2.37.0

Steps to Reproduce

  1. Create a project.yml with more than 150 schemes.
  2. Set up a "preAction" in all schemes to run XcodeGen.
  3. Execute a scheme.

Expected Behavior

I expect XcodeGen to successfully generate all schemes and finish building the project without interruptions.

Current Behavior

XcodeGen stops before completing the project generation

arkonxu avatar Oct 25 '23 14:10 arkonxu

I made a PR with the fix that worked for me: https://github.com/yonaskolb/XcodeGen/pull/1410

arkonxu avatar Oct 25 '23 15:10 arkonxu