14

我正在创建一个 rake exe 来为 xcode 项目添加覆盖范围。我正在使用 Gem xcodeproj。我需要创建一些版本控制方案并运行覆盖脚本。

我一直在制定自己的计划,但进展缓慢。如果我理解这些元素的含义,我觉得我能够更快地调试。

<?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>
4

1 回答 1

2

请注意,这只是非 iOS 开发人员的部分答案,因为我认为由于缺乏研究,该问题有资格关闭

回答所有这些值的含义将过于耗时,并且对于不参与您项目的人来说是浪费时间(尽管信息在那里)。工程需要翻阅文档和无休止的网站,以便在需要时回答哪怕是一小部分信息。

谷歌更独特的东西

以下所有内容都是我在大约十五分钟的谷歌搜索中能够做到的(当然,我即将参考的 Titolo 资源于 2015 年发布,您的问题在 2013 年)

由于我不是 iOS 开发者,我无法谈论这些资源的有效性;但是,它们似乎是合法的。我用谷歌搜索BlueprintIdentifier,因为这似乎很独特,并且能够在谷歌的第二页上找到一些好东西

Michelle Titolo 很好地描述了以下 XML 主体的用途(以及理解它所需的术语):

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

其他的呢?

@Antarr Byrd 早期在评论中发布的文档确实涵盖了这些内容。例如,包含BuildableIdentifier在节点的文档中,就像.BuildableReferenceLaunchAction

我回到谷歌的次数越多,阅读的越多,我就越相信所有这些值都被文档充分记录了。它们可能不是预期的格式,但它们肯定是记录在案的。

文档是人工编写的“东西”的结果。写这篇文章的人可能并不总是以一种易于理解的方式组织起来。但是,这并不意味着信息不存在。

于 2017-11-30T18:56:08.537 回答