Xcode error: no such file or directory when creating

I read related topics, but could not find a solution to my problem.

When I start my project, I first saved it in a folder with an empty space in the name (let it be called "My project")
It also allows you to simplify the path through my project as a simple folder: "My path" (yes, there were spaces in the hierarchy).

I had problems creating my project, especially using the library search path in the Build settings, regularly returning with xcode updates and / or duplicating the project to store the historical version.

To solve this, I replaced all spaces with underscores. So now my project folder name is "My_Project" and the path is "My_path". These changes were also made in the build settings of my project.

But today I have a mistake that I can’t get rid of.
When I create my project, each file compiles fine, but during the “copy” process I get this error.

/!\Copy AFNetworking ...in /Users/admin/Desktop/My_path/My Project/Product-name/Sub Folder CpResource /Users/admin/Desktop/My_path/My\ Project/Product-name/Sub\ Folder/AFNetworking /Users/admin/Library/Developer/Xcode/DerivedData/Product-name-gkplyeugxcxhijajdvpxutaodxmz/Build/Products/Release-iphoneos/Product-name.app/AFNetworking cd /Users/admin/Desktop/My_path/My_Project/Product-name export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/admin/Desktop/My_path/My\ Project/Product-name/Sub\ Folder/AFNetworking /Users/admin/Library/Developer/Xcode/DerivedData/Product-name-gkplyeugxcxhijajdvpxutaodxmz/Build/Products/Release-iphoneos/Product-name.app ------------------------------------- error: /Users/admin/Desktop/My_path/My Project/Product-name/Sub Folder/AFNetworking: No such file or directory 

I do not see in my target settings any field where spaces are not replaced by underscores.

Any help was appreciated.

(I am using Xcode 7.2, OS X El Capitan 10.11.2)

+5
ios build xcode
source share
2 answers

Finally, I will find a somewhat random answer to my problem.

I opened the .xcodeproj file in finder and then edited project.pbxproj . In this file, I created a line:

 84635D6F1C22F90100C55AB2 /* AFNetworking */ = {isa = PBXFileReference; lastKnownFileType = folder; name = AFNetworking; path = "/Users/admin/Desktop/My_path/My Project/Product-name/Sub Folder/AFNetworking"; sourceTree = "<absolute>"; }; 

And reissuing it correctly did the trick.

+7
source share

This middle post helped me: https://freakycoder.com/ios-notes-47-how-to-solve-xcode-no-such-file-or-directory-error-514106eaf287

You must delete the resource in the Bundle Copy Resource section at build time.

enter image description here

0
source share

All Articles