微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在Xcode 6中重命名应用程序

我有一个应用程序,我需要重命名,所以代码可以重复使用只有轻微的变化,我有困难。

我遵循这个链接,它似乎覆盖了它,但是当我尝试构建它,我收到一个链接错误,也是如下:

链接到资源:

http://matthewfecher.com/app-developement/xcode-tips-the-best-way-to-change-a-project-name-in-xcode/

这是我得到的链接错误和我看到的信息

Ld /Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Products/Debug-iphoneos/solfEightFiveTests.xctest/solfEightFiveTests normal arm64
    cd "/Users/jeffjanes/Xcode Projects/solfEightFive/shell"
    export IPHONEOS_DEPLOYMENT_TARGET=8.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.0.sdk -L/Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Products/Debug-iphoneos -F/Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Products/Debug-iphoneos -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/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.0.sdk/Developer/Library/Frameworks -filelist /Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Intermediates/solfEightFive.build/Debug-iphoneos/solfEightFiveTests.build/Objects-normal/arm64/solfEightFiveTests.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -bundle_loader /Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Products/Debug-iphoneos/shell.app/shell -framework XCTest -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=8.0 -Xlinker -dependency_info -Xlinker /Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Intermediates/solfEightFive.build/Debug-iphoneos/solfEightFiveTests.build/Objects-normal/arm64/solfEightFiveTests_dependency_info.dat -o /Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Products/Debug-iphoneos/solfEightFiveTests.xctest/solfEightFiveTests

ld: file not found: /Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Products/Debug-iphoneos/shell.app/shell
clang: error: linker command Failed with exit code 1 (use -v to see invocation)

有没有我失踪的东西?我试着清理它,似乎没有效果

这只是一些澄清,以上链接中描述的过程表明如下:

在项目导航器窗格中的左上角的项目名称上双击缓慢。然后允许Xcode重命名文件

以相同的方式重命名方案

这就是我所做的,也许本身还不够,所以如果有人知道正确的方式请让我知道。

解决方法

最近我也经历过这个问题。
您的XCode项目应该有两个目标。您的应用程序的一个目标是测试的另一个目标。

在测试目标的Build设置中有一个设置名称Test Host。重新命名您的应用目标后,此设置的值不会更新。

正确修改测试主机设置值,一切都应该工作。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐