Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do the XML Elements in an .xcscheme file do

Tags:

xcode

xml

I'm creating a rake exe for adding coverage to an xcode project. I'm using the the Gem xcodeproj. I need to create some schemes for versioning and to run the coverage scripts.

I've been building my own schemes and i'm making slow progress. I feel like I would be able to debug faster if I understood what these elements mean.

<?xml version="1.0" encoding="UTF-8"?>
   <Scheme
    LastUpgradeVersion = "0500"
  version = "1.3">
  <BuildAction
    parallelizeBuildables = "YES"
  buildImplicitDependencies = "YES">
     <BuildActionEntries>
     <BuildActionEntry
        buildForTesting = "YES"
        buildForRunning = "YES"
        buildForProfiling = "YES"
        buildForArchiving = "YES"
        buildForAnalyzing = "YES">
        <BuildableReference
           BuildableIdentifier = "primary"
           BlueprintIdentifier = "7B80F18918187FA5005578A0"
           BuildableName = "TestProj.app"
           BlueprintName = "TestProj"
           ReferencedContainer = "container:TestProj.xcodeproj">
        </BuildableReference>
     </BuildActionEntry>
  </BuildActionEntries>
  </BuildAction>
   <TestAction
  selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  shouldUseLaunchSchemeArgsEnv = "YES"
  buildConfiguration = "Coverage">
  <Testables>
     <TestableReference
        skipped = "NO">
        <BuildableReference
           BuildableIdentifier = "primary"
           BlueprintIdentifier = "7B80F1A418187FA5005578A0"
           BuildableName = "TestProjTests.xctest"
           BlueprintName = "TestProjTests"
           ReferencedContainer = "container:TestProj.xcodeproj">
        </BuildableReference>
     </TestableReference>
      </Testables>
    <PostActions>
     <ExecutionAction
        ActionType =      "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
        <ActionContent
           title = "Run Script"
           scriptText = "/bin/sh ${SRCROOT}/bin/coverage.sh">
           <EnvironmentBuildable>
              <BuildableReference
                 BuildableIdentifier = "primary"
                 BlueprintIdentifier = "7B80F18918187FA5005578A0"
                 BuildableName = "TestProj.app"
                 BlueprintName = "TestProj"
                 ReferencedContainer = "container:TestProj.xcodeproj">
              </BuildableReference>
           </EnvironmentBuildable>
        </ActionContent>
     </ExecutionAction>
  </PostActions>
   </TestAction>
     <LaunchAction
  selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  launchStyle = "0"
  useCustomWorkingDirectory = "NO"
  buildConfiguration = "Debug"
  ignoresPersistentStateOnLaunch = "NO"
  debugDocumentVersioning = "YES"
  allowLocationSimulation = "YES">
  <AdditionalOptions>
  </AdditionalOptions>
  </LaunchAction>
    <ProfileAction
  shouldUseLaunchSchemeArgsEnv = "YES"
  savedToolIdentifier = ""
  useCustomWorkingDirectory = "NO"
  buildConfiguration = "Release"
  debugDocumentVersioning = "YES">
  </ProfileAction>
 <AnalyzeAction
    buildConfiguration = "Debug">
   </AnalyzeAction>
  <ArchiveAction
  buildConfiguration = "Release"
  revealArchiveInOrganizer = "YES">
    </ArchiveAction>
    </Scheme>
like image 274
Jason Cheladyn Avatar asked Oct 24 '13 19:10

Jason Cheladyn


1 Answers

Be forewarned, this is only a partial answer from a non-iOS developer because I believe the question qualifies for closing because of a lack of research:

Answering what all of those values mean would be overly time consuming and a waste of that time for someone not involved in your project (the information is out there, though). Engineering requires wading through documentation and endless websites to answer even a small piece of information when needed.

Google Something More Unique

Everything below is what I was able to do in about fifteen minutes of Googling (granted, the Titolo resource I am about to reference was published in 2015, your question in 2013):

As I am not an iOS developer, I can't speak to the validity of these types of resources; however, they seem legit. I Googled BlueprintIdentifier because that seemed unique enough and was able to find some good stuff on the second page of Google.

Michelle Titolo has done a good job of describing the purpose of the following XML body (and the terminology necessary to understand it):

<BuildActionEntry
    buildForTesting = ""
    buildForRunning = ""
    buildForProfiling = ""
    buildForArchiving = ""
    buildForAnalyzing = "">
    <BuildableReference
       BuildableIdentifier = ""
       BlueprintIdentifier = ""
       BuildableName = ""
       BlueprintName = ""
       ReferencedContainer = "">
    </BuildableReference>
 </BuildActionEntry>

What About the Other Stuff

These really are covered by the documentation that @Antarr Byrd posted in a comment early on. For instance, BuildableIdentifier is covered under the documentation for the BuildableReference node as are things like LaunchAction.

The more I go back to Google, the more I read, the more I am convinced all of those values are adequately documented by the documentation. They may not be in an expected format, but they are certainly documented.

Documentation is the result of human-written "stuff". The people that write this may not always organize in a digestible fashion; however, that doesn't mean the information is not there.

like image 75
Thomas Avatar answered Oct 23 '22 20:10

Thomas