xctool无法清理我的iOS项目 [英] xctool fails to clean my iOS project

查看:249
本文介绍了xctool无法清理我的iOS项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为iOS项目使用 xctool (v0.1.16),其配置如下:

I'm using xctool (v0.1.16) for an iOS project, which is configured as follows:


  • 工作空间

  • 两个目标项目 ProjectTests

  • 两个方案项目 ProjectTests

  • a workspace
  • two targets Project and ProjectTests
  • two schemes Project and ProjectTests

我有一个 .xctool-args 文件,包含工作区和项目已配置方案。

I have a .xctool-args file with the workspace and Project scheme configured.

我运行 xctool build xctool -scheme ProjectTests -sdk iphonesimulator测试成功。

但是,我运行 xctool clean 并发生以下情况:

However, I run xctool clean and the following happens:


  • 第一次运行 xcodebuild清洁项目成功

  • 第二次运行 xcodebuild build clean 失败并显示错误:

    • Scheme Tests is目前尚未配置清理操作。

    • 1st it runs xcodebuild clean Project successfully
    • 2nd it runs xcodebuild build clean which fails with the error:
      • Scheme Tests is not currently configured for the clean action.

      这很奇怪,因为我不喜欢我有一个测试计划。

      It is strange because I don't have a Tests scheme at all.

      我运行 xctool clean -showTasks 并且有有关错误的更多详细信息。它运行并失败

      I run xctool clean -showTasks and have more details about the error. It runs and fails at

      /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild \
        -configuration Debug \
        -workspace    /var/folders/b7/472b_skj24gf7wmw6c3krp5c0000gn/T/xctool_temp_KMbH0e/Tests.xcworkspace \
        -scheme    Tests \
      OBJROOT=/Users/paristote/Library/Developer/Xcode/DerivedData/Project-fmyqwebczmtplydrfhcmrdzezcft/Build/Intermediates \
      SYMROOT=/Users/paristote/Library/Developer/Xcode/DerivedData/Project-fmyqwebczmtplydrfhcmrdzezcft/Build/Products \
      SHARED_PRECOMPS_DIR=/Users/paristote/Library/Developer/Xcode/DerivedData/Project-fmyqwebczmtplydrfhcmrdzezcft/Build/Intermediates/PrecompiledHeaders \
        -IDECustomDerivedDataLocation=/var/folders/b7/472b_skj24gf7wmw6c3krp5c0000gn/T/xctool_temp_KMbH0e/DerivedData \
        clean
      

      但是,单独执行的相同命令也会成功完成。

      However, the same command executed separately finishes successfully.

      / var / f处的工作空间olders / b7 / 472b_skj24gf7wmw6c3krp5c0000gn / T / xctool_temp_KMbH0e / Tests.xcworkspace 只引用两个项目,项目 xcodeproj和 Pods xcodeproj。它确实包含一个带有构建操作的测试方案。

      The workspace at /var/folders/b7/472b_skj24gf7wmw6c3krp5c0000gn/T/xctool_temp_KMbH0e/Tests.xcworkspace simply references two projects, the Project xcodeproj and Pods xcodeproj. It does contain a Tests scheme with a build action.

      为什么这个命令在第一个位置失败?任何帮助都表示赞赏。

      Why does this command fail in the 1st place? Any help is appreciated.

      干杯。

      推荐答案

      我修好了这个通过选中主要方案的共享框来解决问题:

      I fixed this issue by checking the "shared" box for the main scheme:



      1. 选择产品>方案>管理方案。

      1. Choose Product > Scheme > Manage Schemes.

      选择要共享的方案的共享选项,然后单击确定。

      Select the Shared option for the scheme to share, and click OK.

      来源: https://developer.apple.com/library/ios/recipes/xcode_help-scheme_editor/Articles/SchemeShare.html

      这篇关于xctool无法清理我的iOS项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆