CocoaPods / Xcodeproj

Create and modify Xcode projects from Ruby.
http://rubygems.org/gems/xcodeproj
MIT License
2.35k stars 455 forks source link

Schemes can be generated containing a `TestableReference` with no children #927

Open dalemyers opened 10 months ago

dalemyers commented 10 months ago

If you generate a scheme with the TestAction node as follows:

   <TestAction
      buildConfiguration = "Debug"
      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
      shouldUseLaunchSchemeArgsEnv = "YES">
      <Testables>
         <TestableReference
            skipped = "NO">
         </TestableReference>
      </Testables>
   </TestAction>

then Xcode will crash on launch. This is, without a doubt, a bug in Xcode but we should generate "valid" XML anyway.

This is generated when running pod install with our Podfile. I can't share the Podfile unfortunately, but it may be useful to know that the broken scheme belongs to a demo app which is referenced as an appspec (not something I'm particularly familiar with).

This is 100% reproducible in both generation and Xcode crashing.