5

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.

Kevin van Mierlo
  • 9,554
  • 5
  • 44
  • 76
  • stupid thought - are you opening a project file? or a workspace? What do you normally open? has someone added pods to the project for the first time etc.? – Damo Nov 13 '17 at 16:00
  • @Damo I'm opening a workspace. We're using Cocoapods. But pods have been in the project since the beginning, so that's probably not the cause of this. – Kevin van Mierlo Nov 13 '17 at 16:03
  • 1
    may there is an issue in pbxproject file – Sumit Jangra Nov 22 '17 at 08:42
  • @SumitDhariwal I could've sworn that I checked the history of this file. But maybe because the file is so large I might have skipped something. There were a total of 3 lines removed which contained MyProject.app in it and if I put it back on the exact same location, I could select an executable in schemes. Could you create an answer with this info? Then I can accept it – Kevin van Mierlo Nov 22 '17 at 09:08
  • **In my case** I've downloaded app(library) from GitHub and was unable to get the app run on the simulator.It had .xcodeproj, further exploring the subfolders i could find other .xcworkspace and .xcodeproj files. Finding correct .xcworkspace **sorted the issue** – vilas deshmukh Apr 28 '20 at 05:36

1 Answers1

4

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 :)

Nygashi
  • 135
  • 1
  • 9
  • I had multiple schemes for my App and I ended up deleting and recreating the broken scheme. The cause of the problem was indeed not correctly solving merge conflicts. – Teetz Jan 10 '22 at 11:33