首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >xcodebuild忽略-derivedDataPath

xcodebuild忽略-derivedDataPath
EN

Stack Overflow用户
提问于 2021-09-30 18:15:29
回答 1查看 116关注 0票数 1

是我误解了-derivedDataPath的功能,还是这是一个bug?您可以在输出中清楚地看到,xcodebuild忽略了命令行值,默认为Library/Developer/Xcode/DerivedData

代码语言:javascript
复制
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project MyProj.xcodeproj -scheme “MyProj (iOS)" -destination "name=iPhone 12" -derivedDataPath=/Users/alpe77/myproj/MyProj/Build build

User defaults from command line:
    derivedDataPath = /Users/alpe77/myproj/MyProj/Build
    IDEPackageSupportUseBuiltinSCM = YES

note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Using build description from disk
note: Build preparation complete
CodeSign /Users/alpe77/Library/Developer/Xcode/DerivedData/MyProj-aozsidihjyumkvevtfoqflhumohn/Build/Products/Debug-iphonesimulator/MyProj.app (in target 'MyProj (iOS)' from project 'MyProj')
cd /Users/alpe77/myproj/MyProj
export CODESIGN_ALLOCATE\=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate

Signing Identity:     "-"

/usr/bin/codesign --force --sign - --entitlements 
/Users/alpe77/Library/Developer/Xcode/DerivedData/MyProj-aozsidihjyumkvevtfoqflhumohn/Build/Intermediates.noindex/MyProj.build/Debug-iphonesimulator/MyProj\ \(iOS\).build/MyProj.app.xcent --timestamp\=none 
/Users/alpe77/Library/Developer/Xcode/DerivedData/MyProj-aozsidihjyumkvevtfoqflhumohn/Build/Products/Debug-iphonesimulator/MyProj.app
/Users/alpe77/Library/Developer/Xcode/DerivedData/MyProj-aozsidihjyumkvevtfoqflhumohn/Build/Products/Debug-iphonesimulator/MyProj.app: replacing existing signature

** BUILD SUCCEEDED ** [0.771 sec]

% xcrun xcodebuild -version 
Xcode 12.5.1
Build version 12E507
EN

回答 1

Stack Overflow用户

发布于 2021-10-20 12:32:43

我遇到了同样的问题(Xcode12.4),并发现构建环境配置变量CONFIGURATION_BUILD_DIR覆盖了-derivedDataPath中给出的路径

我打开"Xcode首选项>位置>派生数据>高级“,并将构建位置设置从我的自定义设置更改为”唯一“,这解决了问题。

感兴趣的是如何防止CONFIGURATION_BUILD_DIR在命令行上覆盖-derivedDataPath ...

编辑

有关解决方案,请参阅https://stackoverflow.com/a/35662727/403750

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69397106

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档