Xcode: app builds but won't run and the executable can't be selected in schemes

Viewed 1398

I'm working with multiple people on an app in Xcode. Today I started Xcode and tried to run the app on my simulator, but it doesn't run. It builds and gives no errors, but the app won't appear on the simulator. As many questions suggested, I needed to select my executable in the schemes (Manage schemes -> ‘Scheme name’ -> Run -> Info -> ‘Executable dropdown’). But when I edit the scheme, my executable is not visible in the dropdown. Also the .app won't appear in the products folder as it usually does. How do I get it back?

I've tried many things like deleting Derived data, deleting the project and checkout again via version control, I even deleted everything related to Xcode and downloaded it again. But none of this worked.

I also read somewhere that AppCode (IDE from Jetbrains) stores the .app somewhere else. Perhaps this causes an issue with Xcode? But as I said, even if I download the bare project from source control, it builds but doesn't run.

I'm working with Xcode 9.1 at the moment. Also working With AppCode Version 2017.3 EAP.

1 Answers

Maybe the project.pbxproj file does not have the correct reference to the app executable. This might happen when a merge conflict occurs and is not solved correctly.

Try to look for differences in the project.pbxproj file, concerning the occurrences 'YourApp.app' and restore or adjust these where needed. To look for these differences use the commit history in version control tools like Git Kraken.

When this is done, clear derived data and clean the project. Then build.

The app executable should pop up again now :)

Related