MacOS application does not start on Xcode simulator

I installed Xcode 4.2.1 on Mac OS X Lion.

When I create a new project (Mac OS X Cocoa) and click Run, Xcode reports that the build was successful, but the project does not start. No errors, but no applications.

When I do the same on another Mac (but with OS X Snow Leopard and Xcode 4.0.1 installed), the created application starts bouncing in the dock and shows an empty window, as I expected.

When I look at the Console, it seems like nothing strange is happening. I tried reinstalling Xcode, removing everything related to Xcode, but still no luck.

Has anyone understood what could be the problem?

(I tried to run an existing project that previously worked, but it also showed nothing)

Thank you

+67
objective-c xcode cocoa macos
Nov 23 '11 at 15:39
source share
10 answers

I had a similar problem with Xcode 4.5.2.

To fix this, I needed to go to Product> Edit Scheme ...> Select "Run" (in the sidebar)> Info (tab). Here is a drop-down list with the words "Executable file", select it and select the application that you want to launch when you click the "Run" button.

+233
Jan 13 '13 at 21:16
source share

I messed up my settings and had the same problem - it creates an application, but it does not start (either in the simulator or in the device).

Product> Edit Scheme's answer got me halfway - then select Run {your app} on the left. There is an “Autostart” button to check: enter image description here

+8
Feb 18
source share

I had the same issue at the end of 2017 with Xcode 9.2. Uncheck

I needed to uncheck the "Debug Executable" checkbox, and then my application was able to start and stop.

You can open the settings by clicking "Product" → "Scheme" → "Change Scheme ...

+4
Dec 07 '17 at 10:22
source share

Plain

Select the desired active circuit and device / simulator from the toolbar (next to the "play" and "stop" buttons).

The selection of the scheme should look something like the following, where the name corresponds to the corresponding purpose.

Set proper scheme and device / simulator.

+3
Jun 16 '15 at 12:15
source share

Check if your project has rights enabled. Sandbox or iCloud or both.

If you have this and you do not have the appropriate Dev portal certificate, your application will create, but not run.

Disable rights if you are not actively developing functionality around them.

The Console application will show this as a permission failure. But strangely not the Xcode debugging console.

+1
Nov 24 '11 at 12:33
source share

I know this is a well accepted answer, but for those who build / work on a physical device

SOLUTION: Hard restart the device, then clear the project in Xcode ⇧ + ⌘ + K.

I think the bundle got confused, causing Xcode to “think” that it was already running the project, so it displays “Done” instead of starting any application that you have chosen to run.

+1
Dec 15 '17 at 15:09 on
source share

Try uninstalling developer tools by running

sudo Developer/Library/uninstall-devtools --mode=all 

in the terminal. This will remove all dev tool components correctly, including command line components.

Then you can try reinstalling.

0
Nov 23 '11 at 10:22
source share

I had similar problems. I found that the problem was in the ~ / .gdbinit file. And the second time - when initializing the window loadWithNibName / initWithWindow (the wrong nib file name or frame properties). Also check the Info.plist file in your project (parameters "Primary file name nib" and "Main class").

0
Nov 02 '12 at 19:36
source share

Do you have the right project to start?

Click the project name next to the stop button (top left). Are there several projects? Do you have the right choice?

0
Feb 12 '15 at 15:52
source share

Xcode 10.2

Stages:

  1. Product → Scheme → Edit Scheme
  2. Launch
  3. Information
  4. Executable file -> Yourproject.app
  5. Run the whole project again

Screenshot: enter image description here

0
Jul 26 '19 at 1:48
source share



All Articles