alexfromtheoldtown

Q: Xcode builds but does not run

Hi folks,

 

I'm having trouble with Xcode,

Whenever I try to lauch a project it builds correctly and then only says "running <name>:<name>".

Some time ago, I worked on some iOS projects and back then everything was working correctly.

Not even they do run anymore.

I have no idea for which reason it stopped working, in the simulator the app ist just a blank screen.

Mac OS Projects with Cocoa do not even launch the built application. Console Applications do not work either.

 

I had this behaviour with XCode 7, then tried the 8 Beta which also had the problem.

This morning I decided to uninstall XCode and reinstalled XCode 8 Release from App Store.

The problem does persist.

 

Im running OSX 10.11.6 and Xcode Version 8.0 (8A218a).

Please help me out, I am getting desperate. I can not develop this way.

 

Best Regards,

Alex

MacBook Pro (Retina, 13-inch,Early 2015), OS X El Capitan (10.11.6)

Posted on Sep 15, 2016 1:50 AM

Close

Q: Xcode builds but does not run

  • All replies
  • Helpful answers

  • by Wayne Contello,

    Wayne Contello Wayne Contello Sep 15, 2016 6:12 AM in response to alexfromtheoldtown
    Level 6 (19,141 points)
    iWork
    Sep 15, 2016 6:12 AM in response to alexfromtheoldtown

    I would check to see if there is a modal dialog box asking you to authenticate before running your application:

    Screen Shot 2016-09-15 at 8.11.43 AM.png

     

    If you do not authenticate you application probably will not run

  • by etresoft,

    etresoft etresoft Sep 15, 2016 7:08 AM in response to alexfromtheoldtown
    Level 7 (29,198 points)
    Mac OS X
    Sep 15, 2016 7:08 AM in response to alexfromtheoldtown

    Hello Alex,

    The most common cause of a problem like this is not using the appropriate project template. Try to create a new "hello world" style project that doesn't do anything. The templates are automatically setup to build such a project. If that works, then you just need to rebuild your projects. Create new projects with the correct templates and the same names as existing projects. Then move over your code and resources.

  • by alexfromtheoldtown,

    alexfromtheoldtown alexfromtheoldtown Sep 15, 2016 7:36 AM in response to Wayne Contello
    Level 1 (4 points)
    Sep 15, 2016 7:36 AM in response to Wayne Contello

    I do not get this window when trying to launch a program, but I also did not get it back when everything was working, so I'm not sure that is the problem.

  • by alexfromtheoldtown,

    alexfromtheoldtown alexfromtheoldtown Sep 15, 2016 7:39 AM in response to etresoft
    Level 1 (4 points)
    Sep 15, 2016 7:39 AM in response to etresoft

    Sorry if my first post was not clear,

    this is exactly what I did, if I create an empty macOS/Cocoa Application project I should be able to launch it.

    But if I do, the build is fine but it won't run. If I try to close Xcode then it says there is a task running and won't shut down. If I force close Xcode the program will launch, but obviously I can not debug this way and do not intend to force close&restart Xcode everytime I want to launch the application.

    Any other ideas?

  • by alexfromtheoldtown,

    alexfromtheoldtown alexfromtheoldtown Sep 16, 2016 2:16 PM in response to alexfromtheoldtown
    Level 1 (4 points)
    Sep 16, 2016 2:16 PM in response to alexfromtheoldtown

    So I created a different user account and when I login to the new user everything works fine.

    Is there some way to overwrite my real users xcode with the one of the new user?

  • by Wayne Contello,

    Wayne Contello Wayne Contello Sep 17, 2016 8:35 AM in response to alexfromtheoldtown
    Level 6 (19,141 points)
    iWork
    Sep 17, 2016 8:35 AM in response to alexfromtheoldtown

    Quit XCode

     

     

    In the Finder select the menu item "Go > Go To Folder…"

     

     

    enter the path:

    ~/Library/

     

    now look in the folder

    ~/Library/Preferences

     

    move the file to your desktop

         com.apple.Xcode.plist

     

    now try restarting XCode

  • by alexfromtheoldtown,Solvedanswer

    alexfromtheoldtown alexfromtheoldtown Sep 18, 2016 6:11 AM in response to alexfromtheoldtown
    Level 1 (4 points)
    Sep 18, 2016 6:11 AM in response to alexfromtheoldtown

    I was able to solve the problem, so here's what fixed it in case anyone else runs into this.

    As I wrote I could run projects just fine under a different User Account.

    1. Create a new User Account (Admin)

    2. Login to new User

    3. Go to System Settings and Remove the old user

    4. Create a new User with the SAME Name and shorthand as the old one

    4.b There should be a window saying there already is a folder with the same name and if you want to use it. Press YES

    5. Logout and maybe Restart

    6. Login to old user again, it should work now

     

    EDIT: The problem seemes to be because of an .lldbinit file

  • by alexfromtheoldtown,

    alexfromtheoldtown alexfromtheoldtown Sep 18, 2016 6:11 AM in response to alexfromtheoldtown
    Level 1 (4 points)
    Sep 18, 2016 6:11 AM in response to alexfromtheoldtown

    EDIT: The problem seemed to be because of an .lldbinit file, if it is present Xcode won't run the projects.