Reputation: 61
The project is Objective-C based. The project was building previously building successfully, but now when I try to build, I'm getting the above error. I've seen some posts here with similar issues, but those errors specify permissions errors or give messages like 'no such directory', whereas mine does not, and their solutions do not resolve my problem. In fact, the error message I receive has almost no detail at all:
MkDir /[PATH_TO_APP]/[APP_NAME].app (in target '[TARGET]' from project '[PROJECT]')
cd /[PATH_TO_APP]/
/bin/mkdir -p /[PATH_TO_APP]/[APP_NAME].app
error: unable to create directory '/[PATH_TO_APP]/[APP_NAME].app' (in target '[TARGET]' from project '[PROJECT]')
I've also tried the following:
Note also that I recently archived and uploaded to the app store; I thought it might be something configuration related that I had forgotten about but haven't been able to locate anything.
Update: After navigating to the project folder in a terminal window and running ls -l command if can see the following for my .app:
[APP NAME].app -> /Users/[ME]/Library/Developer/Xcode/DerivedData/[APP NAME]-goiubutyqcjhzheixixhbodhavhe/Build/Intermediates.noindex/ArchiveIntermediates/[APP NAME]/InstallationBuildProductsLocation/Applications/[APP NAME].app
Note that that location (following the ->) does not exist.
Upvotes: 2
Views: 2331
Reputation: 42588
You have a soft link (or symbolic link) where your app folder should be. Delete the soft link.
The following command creates a symbolic link at the command-line interface (shell):
ln -s target_path link_path
target_path is the relative or absolute path to which the symbolic link should point. Usually the target will exist, although symbolic links may be created to non-existent targets. link_path is the path of the symbolic link.
After creating the symbolic link, it may generally be treated as an alias for the target. Any file system management commands (e.g., cp, rm) may be used on the symbolic link. Commands which read or write file contents will access the contents of the target file. The rm (delete file) command, however, removes the link itself, not the target file. Likewise, the mv command moves or renames the link, not the target.
The POSIX directory listing application, ls, denotes symbolic links with an arrow after the name, pointing to the name of the target file (see following example), when the long directory list is requested (-l option). When a directory listing of a symbolic link that points to a directory is requested, only the link itself will be displayed. In order to obtain a listing of the linked directory, the path must include a trailing directory separator character ('/', slash).
— https://en.wikipedia.org/wiki/Symbolic_link
Upvotes: 1