June 30, 2020

Xcode 11: Signing Identity: "-" and app is a directory issue

How to fix the "Xcode 11: Signing Identity: "-"" and "app is a directory" issue.

I’m building an app in Swift and ran into this issue, after upgrading to Xcode 11.3.1

My app had built and ran successfully before the update, but afterwards, I had a code signing issue, with the following output:

command/usr/bin/codesign failed with exit code 1 Signing identity  "-"

This was due to me having manually selected code signing rather than automatically signing the app.

However, I then had a second problem:

command/usr/bin/codesign failed with exit code 1  {appname}.app Is a directory

I had a directory with the same name as the target file (which wasn’t an issue before). For some reason in Xcode 11, I  I needed to change the display name of my app to something different from the folder name.

Screenshot 2020-03-18 at 17.11.15.png

Once I did that, the app built normally again. I couldn’t find anything about this online, so I thought I’d post it here.