由于Apple链接器错误,应用程序重命名后单元测试无法运行

The*_*ner 6 iphone xcode objective-c

我最近更改了我的应用程序的名称,现在我的单元测试没有运行,我收到Apple链接器错误.

知道如何解决这个问题吗?如果我在Xcode中展开我的'Products'文件夹,则有2个文件:

MyApp.app MyAppTests.octest [显示为红色]

更新: 删除所有构建文件夹(派生数据)仍然无法正常工作!

Ld /Users/my/Library/Developer/Xcode/DerivedData/srStudio-bdkguonwasdiazelguppliitkdox/Build/Products/Debug-iphonesimulator/companyDesignerTests.octest/companyDesignerTests normal i386 cd/Users/my/Documents/Working/companyDesigner setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr /斌/铛-arch i386的-bundle -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L /用户/我/库/开发商/ Xcode中/ DerivedData/srStudio-bdkguonwasdiazelguppliitkdox /编译/产品/调试-iphonesimulator -F/Users/my/Library/Developer/Xcode/DerivedData/srStudio-bdkguonwasdiazelguppliitkdox/Build/Products/Debug-iphonesimulator -F/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0. sdk/Developer/Library/Frameworks -F/Developer/Platforms/iPhoneSimulator.platform/Developer/SD KS/iPhoneSimulator5.0.sdk /开发/库/框架-filelist /Users/my/Library/Developer/Xcode/DerivedData/srStudio-bdkguonwasdiazelguppliitkdox/Build/Intermediates/srStudio.build/Debug-iphonesimulator/companyDesignerTests.build/Objects-正常/ I386/companyDesignerTests.LinkFileList -mmacosx版本分钟= 10.6 -bundle_loader "/用户/我/库/开发商/ Xcode中/ DerivedData/srStudio-bdkguonwasdiazelguppliitkdox /编译/产品/调试-iphonesimulator/S&r.app" - Xlinker -objc_abi_version -Xlinker 2 -lxml2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED = 50000 -framework CoreData -framework CoreGraphics在-framework基金会-framework UIKit的-framework SenTestingKit -o /用户/我/库/开发商/ Xcode中/ DerivedData/srStudio-bdkguonwasdiazelguppliitkdox /构建/产品/调试-iphonesimulator/companyDesignerTests.octest/companyDesignerTests

LD:在/用户/我/库/开发商/ Xcode中/ DerivedData/srStudio-bdkguonwasdiazelguppliitkdox /编译/产品/调试-iphonesimulator/S&r.app,不能映射文件,错误号= 22 i386硬件架构下命令/开发商/平台/ iPhoneSimulator.platform/Developer/usr/bin/clang失败,退出代码为1

shi*_*po7 7

以下解决方案适合我:

- >选择您的项目

- >从TARGET中选择projectTest文件

- >在主机应用程序中,只有在显示自定义时才从下拉列表中选择项目


Ale*_*lom 1

我不知道这是否可以帮助您解决问题,但您可以尝试转到组织者并在“项目”选项卡下点击“删除所有派生数据”