xcode修改項目名後反覆出現 clang error, 提示 ld: file not found . xcode
而且該錯誤並非出如今項目編譯階段,而是項目的Tests 的link階段, 同時提示 xctest 出現錯誤,詳細描述以下:app
Ld /Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Products/Debug-iphoneos/iddnTests.xctest/iddnTests normal arm64
cd /Users/iOSDev/dev/propertymanager
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -L/Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Products/Debug-iphoneos -F/Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Products/Debug-iphoneos -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/Developer/Library/Frameworks -filelist /Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Intermediates/iddn.build/Debug-iphoneos/iddnTests.build/Objects-normal/arm64/iddnTests.LinkFileList -dead_strip -bundle_loader /Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Products/Debug-iphoneos/PMS.app/PMS -framework XCTest -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -framework XCTest -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Intermediates/iddn.build/Debug-iphoneos/iddnTests.build/Objects-normal/arm64/iddnTests_dependency_info.dat -o /Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Products/Debug-iphoneos/iddnTests.xctest/iddnTestsiphone
ld: file not found: /Users/iOSDev/Library/Developer/Xcode/DerivedData/iddn-apnitmxvcbgmcoczqswzexnvbxai/Build/Products/Debug-iphoneos/PMS.app/PMS
clang: error: linker command failed with exit code 1 (use -v to see invocation)ui
則該錯誤致使的緣由是,咱們在修改項目名稱後,並未自動修改test部分的連接設置。code
解決該問題的方法是: 修改bundler loader setting.orm
菜單 project->Scheme->Edit Scheme. 取消test執行的操做。 這是最簡單粗暴的方法。ip