XCode does not open at all on Mac Mini - xcode

I bought an M1 Mac Mini recently and tried to use XCode on it, but it does not open at all.
I tried re-install it and delete ~/Library/Developer directory, it seems nothing works.
This is my first Mac device and if I give more detail about what I mean by 'does not open at all' - it does nothing even if I double click the XCode from Applications directory or the bar at the bottom that has other installed applications showing on it(sorry, I don't know how this is called).
I can see the little grey dot under the icon which means it is running somehow, but nothing comes up on the screen. Then the grey dot goes away after few minutes with nothing happening.
How do I resolve this problem?

Making sure that the application itself is in the right place would be my first approach. Did you download Xcode from the App Store?
Here’s a link to someone with the same issue asking on the Apple developers forum
https://developer.apple.com/forums/thread/101265

Go to applications folder, right click, "get info" and then “Open using Rosetta”. Check the box.

Related

Destination toolbar disappeared on XCode 6.4

Today in the morning I tried to compile my project to run in my device and I found the destination toolbar disappeared and I cannot choose my IOS device or IOS Simulator device as target. (I can do it in the Product/Destination Menu)
After some research I found the >> at the right on the screen and when I pushed a Scheme option appeared but it is disabled and I can't enable again.
This is what I tried with no success:
Open an old project to see if the problem was in my project
Create a new project (with Swift and Objective C but I don't think this make any difference)
Restart my computer
Hide and show the toolbar (View menu/Hide Toolbar and the View menu/Show Toolbar)
I tried all the previous options with the device connected and disconnected
I have installed the IOS Simulator 8.4 (when I run my project it runs in the last selected simulator) and XCode 6.4.
Looks like Xcode hides that menu when the window is a certain size. I have to make my window quite large before it comes back.
Not a fix as such but you can work around it using the menus: Product > Scheme and Product > Destination
You're probably running into the same issue I am. Like #BrandonWilliams said in his answer, it appears again if the Xcode window is wide enough. The underlying cause, for me at least, seems to be that in this build of Xcode (6.4) running on El Capitan beta 2 (with Xcode 7 beta installed), I am seeing duplicate simulators for iOS 8.4. And since there are two of the same version, the Schemes dropdown shows some sort of long GUID next to each one, causing the Scheme dropdown to be quite large:
I came to SO looking for an answer but realized that I had seen this issue before.
So the problem is basically that auto layout sucks (I mean it is not working properly in Xcode 6) and on El Capitan, the destination toolbar is for some reason hiding instead of collapsing properly. So when your Xcode window is narrow, the destination toolbar disappears.
But, if you expand the window far enough, it shows back up again.
In case you can't tell, in the first screenshot, the window is about 1241 pixels wide and in the second screenshot the window is 1541 pixels wide.
Go to Product then Destination and choose at which simulator or device you want to test your build.
I'm running with same problem. You can select device or change scheme using below steps:
Select Product from menu
Select Scheme or Destination
Select required Scheme option or Destination option
Alternative Solution:
The only solution is to use Xcode 7 or above. I've installed Xcode 7.1 and found Scheme/Simulator list available. Refer screenshot.
It seems that Xcode 6 or below doesn't support OS X El Capitan.
I am still seeing this problem in Xcode 7.2 on iMac with resolution 1920x1080. Resizing the XCode windows dens't help. I can have the menu bar back if I push the green button and go to full screen mode. But that's pretty annoying. This is how I finally figure out a solution that works for me. I notice that only if I open the project file that I have been working daily that the menu bar is missing. If I create a new project, the menu bar is there. And here is my solution:
Remove your project file on disc (or move it to a different folder)
Open the Welcome to Xcode window by shift+command+1
Make sure your project is no longer under this list. If it is still there, click on it and Xcode will tell you the project is not found and it will be removed.
Add the project file back and open it and I have my menu bar back (if you have moved it, simply opening it from a different file location may work I guess)
I guess the problem is that some cache value in Xcode about the project file is messed up somehow. Hope this helps.
I make my XCode screen little big and now find both options.
On XCode 9.0 beta, this worked for me: select View -> Show Toolbar from menu
right click on title bar -> select show toolbar
Fixed it by deleting the following file ~/Library/Preferences/com.apple.dt.Xcode.plist and restarting Xcode.
The downside is that Xcode preferences dropped to defaults obviously.

How to uninstall Xcode 6 and remove all related files

I need to completely reinstall Xcode 6 and remove all the files and settings with it.
I know that it is uninstalled so that you go to mission control, long click on it and then click on the X button, like on iPhone.
I also know that you can drag it to trash from applications.
But after all those, when I install it again through AppStore and open the last project I was working on, Xcode will open the project on exactly the same class where i t was shut down and even show the last error I faced!
I don't want that. That means that some User Preferences are still saved somewhere and I want to get rid of them as I have never ever had Xcode installed on my Mac.
How to do that?
You can use several uninstall programs like you would uninstall any other Mac application.
So some examples might be App Cleaner or Clean My Mac.
Hope that helps :)

Xcode 5 on Mountain Lion 10.8.5 won't load

Since I installed the Xcode 5 from the App Store I can't start Xcode.
I click on the Xcode icon, then icon bounce 1 time then nothing.
The program doesn't respond...
I tried to uninstall and reinstall Xcode but I got the same problem.
I think the best way is to completely uninstall XCode and its accompanying utilities.
You can follow this link for that.
I am plagued by this problem. Ever since I updated to XCode 5 I have had nothing but trouble. When I open it it does nothing but it does say Application Not Responding when you right-click the icon in the tray.
Once I walked away and hours later when I came back it was open. So I tried it again and waited. around 30 minutes later, it opened. I've figured out that if you wait long enough, eventually it opens.
I know this is only a temporary, partial solution, but it may be all you have until the release Mavericks. I have read in searching for a solution that XCode 5 works in 10.9 but developers struggle using it on 10.8.5 <----- specifically 5!
I just installed the 10.8.5 supplemental 1.0 update and it didn't change anything for me.
Try to open the program and see if letting it sit for a while maybe even overnight, and see if it opens like mine. If so, maybe someone can help with that extra information.
Well i have the exact same problem that you are facing. This is how you can solve it:
First of all just uninstall the current version of Xcode from your Mac completely. You can delete it from the Applications. After that you will still see the Xcode icon in the LaunchPad and i don't know why. You have to delete it from the LaunchPad too. Just by clicking and holding until the cross button appears and then press the cross button to delete.
Once this is done, don't download it from the App Store. Instead download from a direct link. Go to this LINK and find the Xcode and download the DMG file. Then you can install it and you will have no problem.
You can either waste your time troubleshooting the problem or you can just do what i told you to save some time. The choice is yours!
Hope this helps!

Unable to build using Xcode 4 - The selected run destination is not valid for this action

So I'm horribly confused by this error, other threads on Stack Overflow mention I should set the SDK, but I see no option to do this. I'm trying to build:http://wafflesoftware.net/shortcut/
And I get no options, and I can only choose My Mac 64-bit, and I want it in 32-bit. Really beginning to hate Xcode 4.
Here is the screenshot when I try to edit my scheme: http://groovyape.com/scheme.png
Thoughts?
Firstly, I have observed that when Xcode 4 decides my Mac is 64 bit and all my other schemes have vanished, a restart of Xcode fixes that.
If you still have the issue after a restart, go to Manage Schemes... (under the Product Menu) and click on Autocreate Schemes now button. Try to delete the other schemes and see if you can run the project now.
However, if the issue is that you need to set the SDK, that's different:
Click on the top-level project icon in the left hand panel
In the right hand panel that appears, select Build Settings (near the top).
Select "All" option (instead of Combined)
Ensure Base SDK is set appropriately, like "OS X 10.7".
FWIW I'm seriously considering reverting to Xcode 3.2.5 at the moment, 4 seems horrendously buggy.
In xCode 4.4.1, use Validate Settings to solve the problem!
I can select either 32bit or 64bit now.
Ran into the same error message ("The selected run destination is not valid for this action") when attempting to use XCode 4 to build/run a tiny Objective-C "Hello, World" project I created in XCode 3.x. Fixed it by choosing to "Manage Schemes..." from the drop-down menu to the right of the Stop button, deleting the one scheme on the list (click checkbox beside the scheme, then click the "-" button at the bottom left), and then clicking "Autocreate Schemes Now".
I also needed to change the "Base SDK" from 10.5 to 10.6, by clicking on 'folder' icon (beneath the Run button), clicking the root/top of the tree view below it, clicking on the blue icon below "PROJECT" in the pane just to the right, and then finally, choosing "Latest Mac OS X (Mac OS X 10.6)" to the right of that.
I had this issue today. I found switching Base SDK from Latest iOS (4.3) to iOS 4.3 fixed everything.
This will happen if XCode believes your mac is a 64-bit machine, when really it's a 32-bit. If this is the case for you, simply click on your project icon from the far-left pane - it's the menu item that displays your project name next to a little blue icon. This should bring up a center pane that says "PROJECT" at the top. Highlight your project name, and the third pane should now show your build settings. The first item is "Architectures" which will allow you to specify if you are building a 32-bit or 64-bit application.
Kind of amazing that none of the answers here solved the issue for me, but I figured it out. Forget restarting Xcode, or using Autocreate Schemes, still only 64-bit will show up as a valid destination in the scheme.
The correct solution is to change the Architecture for your project. Go to Build Settings (in the root node of your project), and change Architecture to 32-bit Intel, it's right above the Base SDK setting. Destination will instantly switch to "My Mac 32-bit". HTH somebody.
It sounds as if you're trying to run (Cmd-R or run button) the framework (which you can't do - it's not an executable, just a library) rather than simply build it (Cmd-B).
I had this issue and maybe it was a coincidence but when I restarted XC4 but this time didn't choose to load my project from the popup window that appears on launch - instead choosing it explicitly from the File menu - the issue didn't occur and the build started ok.
On the 3 or 4 occasions I had this error, I had chosen to load the project from the popup window that appears when XC4 first loads.
As I say, I might have just got lucky, but I certainly didn't make any other changes to the projects to 'fix' the issue.
I found a good practice for moving from Xcode 3.2.X to Xcode 4 is, to remove any references to older SDKs (in the case of Mac OS to remove any Base SDK Ref, etc., for Mac OS <= 10.5, in the case of iOS I think you need to remove everything <= 4.3) PRIOR to upgrading to Xcode 4.
I never experienced any problems for new Projects, created in Xcode 4, only for such that where created with Xcode 3.X or 2.X
Xcode 4.5. I was trying to compile for 10.6. It seemed to be stuck on 64 bit just because it couldn't find the sdk. I didn't get any message about it not finding the sdk.
I first tried to put in the correct path to /Developer-3.2.6/SDKs/MacOSX10.6.sdk but xcode didn't want to find it there. Then I copied that folder into 4.5 next to the other OSX Platform sdk (new location I think just look in the bundle).
And magically my 32 bit came back.
So my conclusion is that the 32/64 bit option is really dependent on whether xcode can verify the sdk that you're trying to use. Being stuck at 64 while trying to compile for 32 gives the error without notifying you that its first issue is that the sdk can't be found.
I fixed this by deleting my xcuserdata in my Project file. Not sure how it got corrupt. But it worked for everyone else in the office, deleting the xcuserdata did the trick. I made sure Xcode was closed while doing so. Just for fun, make sure you delete your DerivedData folder for the app, and do a build clean for superstitious folks.
If this happened after you renamed your app, go to Schemes -> Edit Scheme -> Run <YourApp> -> Info
Select the right executable file (YourApp.app)
Another way is to select None as executable and then reselect the YourApp.app from your Debug-iPhoneOS folder.

Xcode won't start after first launch?

I recently installed Xcode and after closing out of the first launch (because I realized I had more configuring to do). I cannot get it to re-launch. The icon will come up, but no program will show up. I do not get an error, and I am launching from the /Developer folder (not /Applications). I have tried re-installing/restarting multiple times to no avail. I have the latest version, and I am running Snow Leopard (10.6.6).
The icon will come up, but no program will show up.
Are you new to OS X? It sounds like you are describing the way OS X apps normally start up. By default, Xcode pops up a window with a list of most recent projects, but you can switch this off. It doesn't mean that Xcode isn't running, it just means you don't have any Xcode windows open. You can still select any of the usual menu items to start new projects, open existing projects, etc.
The answer to this problem is I believe easily sorted. Once you open X code and all you get is the menu bar at the top, go to Window, Welcome to x Code, then check the box bottom left hand corner of that screen 'Show this window when Xcode launches'
Job done ! Now every time you hit the Xcode icon where ever it is the welcome screen will open and from there you can proceed into the program.
Probably not your problem, but I had issues starting xcode with it trying to load up the last project I was working on. It would just hang and I had to force quit it.
In the end I deleted these directories:
project.xcworkspace/
xcuserdata/
and next time I tried to restart xcode it started fine.
Please go project folder and right click ."xcworkspace" and open "show package contents"-> xcuserdata and delete user folder and then relaunch.
In my case I launched XCode 6 (beta 7) on my MacBook Pro Mid 2010, and I had to wait for ~10minutes for anything to happen. I didn't see icon in dock, or even menu bar - just a reference in Force Quit Applications menu. After those 10 minutes classic alert with "You have downloaded Xcode from internet..." title appeared and then i had to wait another 5 minutes for another progress (installation of additional components).In overall it took Xcode 6 ~25 minutes to start.
So... Patience! :)

Resources