Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Renaming App in Xcode 6

Tags:

I have an app that I need to rename so the code can be reused with only slight changes and I am having difficulties.

I followed this link and it seemed to cover it but when I tried build it I received a linking error which also follows:

Link to resource:

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

This is the linking error I get and info I see

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)

Is there something I am missing? I tried cleaning it and that seemed to have no effect.

This is just some clarification the process described in the link above suggests the following:

Double click slowly on the project name in the project navigator pane in the upper left hand portion of the screen. Then allow Xcode to rename the files

And

Renaming the scheme in the same way

That is all I did maybe that in itself was not enough so if someone knows the proper way please let me know.

like image 527
Jeff Janes Avatar asked Oct 04 '14 20:10

Jeff Janes


1 Answers

I also experienced this issue recently. Your XCode project should have two targets. One target for your app the other target for the tests.

In the Build settings for the test target there is a setting name Test Host. The value for this setting does not get updated once you rename your app target.

Properly modify the Test Host setting value and everything should work.

like image 175
Camilo Sanchez Avatar answered Nov 02 '22 23:11

Camilo Sanchez