xcode 6.3 hangs when opening organizer - ios

I archived my project for adhoc deployment and it got stuck after it said archive completed.
Now whenever I click Window->Organizer Xcode freezes up. I need to save my archive for adhoc deployment but it just won't let me. I've tried restarting xcode and my macbook.
Any thoughts?

I don't know what was causing my xCode (6.3.1) organiser to freeze, but I manually cleared out the Archives folder and organiser returned.
rm -rfd ~/Library/Developer/Xcode/Archives/*
If, like me, you have archives you want to keep, remove individual archive folders by date order as needed and then try open organiser.
rm -rfd ~/Library/Developer/Xcode/Archives/2015-xx-xx

I removed all of the archives in Archives directory but the Organizer kept on hanging.
If you have too many different products (mine are over 200), Organizer shows up, then the colored wheel appears and keeps spinning forever. Move most of the directories in the ~/Library/Developer/Xcode/Products directory somewhere else, and leave the needed ones only. That fixed the hang for me.

I had this too and filed bug 22455581 on it.
Xcode 6.4 and 7b5 (I didn't try 6.3) do something with the archives when the organizer window is first opened after each launch. This something takes a bit over a half second for each archive during which time all you see is the spinning beachball of death and Force Quit declaring Xcode is unresponsive. So in my case with 7+GB of archives, had I waited a thousand or so seconds, the organizer window would have eventually popped up.
As answered above, the workaround is fairly simple: quit Xcode and reduce the number of archives in ~/Library/Developer/Xcode/Archives. Move them out to somewhere else so you can move them back in as needed.

Someone at apple forget to do stuff on the background thread,... They look into all your account that xcode has access to and than scans all the folders for files. Also it makes a lot of webcalls for each related project to get crash logs. During this process the entire main thread stalls until it is all finished.... You cannot really do anything yourself for it except complain to apple or try to keep the apps/accounts you use at the same time to a minimum (not a real solution...)

Related

Xcode Beta 7 Simulator hung on Apple or standard screen, cannot load up my app

I tried to create two view controllers with a segue (just static pngs for now) just to test a build.
Either screen is all black or I get the standard Apple screen (just the regular icons), but don't see my build as a placeholder icon.
I already tried following these recommendations from the Apple Developer Forum and still see no solution. =/
Reinstall the Xcode beta
rm -rf ~/Library/Developer/Xcode/DerivedData
Open Xcode and delete all the simulators using the Window > Devices window
Take a backup of ~/Library/Developer/CoreSimulator/Devices/device_set.plist and then remove the com.apple.CoreSimulator.SimRuntime.iOS-9-0 key. Xcode doesn't seem to put this back so I don't know what else this might break.
Reinstall simulators within Xcode using the + in the lower-left of Window > Devices.
You should not be modifying ~/Library/Developer/CoreSimulator/Devices yourself. Chances are CoreSimulatorService was running at the time you did that, so you basically changed state out from underneath it. Where was that recommended to you? I'd like to comment in that thread so as to not let that information stand.
If you want to erase a device back to its default state, you can use xcrun simctl erase <UDID> or just choose the menu item in Simulator.
Now as to your initial problem, when you click on Build & Run, Xcode will install the application and then launch it for you. If you're not seeing it even install, then there's possibly something going wrong with install. I suggest you take a look at your device's system.log to see if installation was requested by CoreSimulatorBridge. If it was, then look for additional log lines that might indicate the failure reason. If it wasn't, then the issue is on the Xcode side.
Either way, you should file a radar at http://bugreport.apple.com including ~/Library/Logs/CoreSimulator/*.log ~/Library/Logs/CoreSimulator/[UDID]/system.log and a sysdiagnose taken when the issue is reproducing.

"No space left on device" error when compiling

In Xcode, when I tried to run my app on my device (iPhone), I get "no space left on device". The app was working on iPhone yesterday, but today I got this error.
Anyone know how to fix this problem?
There are two common steps to this fairly common issue:
Delete the app from your device.
command+k which will clean your code and run again.
OR
Close Xcode and reopen, run again.
Ensure you delete the app from your device first. If necessary, turn your phone off and on again, but I have never had to do this after erasing the app from the device and reinstalling.
Maybe need to check storage on your Mac. I have the same problem with Xcode8.3.2 with 2Gb available of SSD on MacBook, after delete somethings then it worked.
Do Product -> clean. Then delete everything from DerivedData folder and empty trash.
To restore some bulk space back, delete some of the simulators and
build archives that you don't need..
Goto Xcode -> Window -> Devices & Simulators -> Right click and delete some simulators that you won't need for testing..
Also Xcode -> Window -> Organizer. Tap archives and select projects from drop down and remove all archives of builds that you won't need anymore. Usually you won't need them because you would have already generated ipa from them and would many GBs of space and this issue will be solved. It worked for me.
I am currently seeing this error message ("No space left on device") when creating named semaphores using sem_open(). (A Unix function call) The error message text is returned by a function called errno(), the result of which I write to the console when sem_open fails.
It sounds to me like some code you are using is attempting to create a semaphore and getting this error. It's my understanding that this happens when you create too many named semaphores without freeing them (They persist between runs of your program.) You will probably solve the problem temporarily by rebooting your phone.
The same message may well be displayed by other system functions, not just sem_open. You might try setting a symbolic breakpoint on errno() and seeing if you can find the code that is generating the error message.
If anyone have issue on Mac or windows emulator and not on actual device than please open the disk on which your project code is and check that disk size and not your primary application disk size, you will need space on that disk too which had your project code, I did this and it just worked fine after that.
I encountered this error when building the app in iOS Simulator. I realized that my Mac's storage was full. So, I freed up some space of about 10 GB, and the rebuild was successful.
Check you hard disk, if its full then delete some unwanted data build and run. It worked for me.
please free up the memory of your mac machine and try build it will work.
I checked the storage on both iPhone and Mac, there was a lot available.
Logout and re-login made the problem go away (I didn't delete the app from the iPhone).

Thoroughly Cleaning Out App Data for Clean Build?

I have never had a problem like this but its clear a thorough clean out of all app data related to my project needs to be done as I am getting a crash related to UICollectionView which I have no removed any reference to in its entirety. I have tested the build on the simulator after resting its contents and it runs without the crash.
For building to my iPhone, I have deleted the app, restarted my iPhone, cleaned the project in Xcode, quit Xcode, restarted my computer and re-built and run. However my iPhone seems to be remembering something from that old build, resulting in this error to still be prevelent.
So how can I truly once and for all (without restoring my bleeding iPhone) clean out any old data related to my Xcode build?
Thanks.
Deleting the app on your phone should be sufficient. Your phone will not "remember" the app, as you suggest it might be. The only thing an app can physically leave behind after being deleted is anything that it put into the Keychain, such as a username/password that was saved there. Other than that, nothing can be left behind after an app deletion (at least not for practical purposes, I'm not trying to claim that iOS zeroes out the bits).
That said, obviously do a clean in Xcode and then delete your derived data. For full instructions on doing a complete clean, see the answer to the following question: How to Empty Caches and Clean All Targets Xcode 4
Have you tried deleting the Derived Data in Organizer? Press Command-Shift-2 and go to the Projects tab. Under your projects you should see a long path to Derived Data. Delete that, restart your computer, and let Xcode reindex your project. Link to a screenshot

Archives no longer displaying in organizer

I am trying to submit an update for my app to the app store. All of a sudden Archives are no longer showing up in the Archives section of the Organizer. Xcode says the Archive was successful with no errors, but it never displays...
Workflow:
1. Clean
2. Build for Archive
3. Archive
This article did not help me: Archive does not appear in xcode4 organizer
Any suggestions?
This probably seems silly, but make sure the Reveal Archive in Organizer is checked in your scheme.
http://developer.apple.com/library/ios/#recipes/xcode_help-scheme_editor/Articles/SchemeArchive.html#//apple_ref/doc/uid/TP40010402-CH6
Ok, so I've resolved this issue, but I truly don't understand what happened. Xcode had asked me if I wanted to "upgrade to latest recommended settings and performing project clean up"; sounds great, right? Wrong.
After that is when my problems started. Thankfully it created a snapshot before it did this and I was able to restore back to it. I am now able to Archive just fine.

Xcode Build and Archive for Enterprise Distribution builds old archive

I'm working on creating an app for in house distribution enterprise level. I've created the app and tested hosting it on my own server and even getting the click to install working. Now though I have some updates to the app, I make the edits and I even see them in the simulator. When I build and archive the app things seem fine, then I go to the archived project in the organizer window, click the share button and distribute for enterprise, I enter details such as the ipa final url and the app title and then ok & save. Then I upload the app to my server and update any links to point to this new app. The click to install still works properly, but it installs the old version of the app. I've even tried this on a new device. Is there some step I'm mission that tells Xcode some version to build? If so, I don't get is how the simulator shows the update fine, but the archive that is built is not showing the latest code. The app I can find in the simulator dirs is 9.4MB in file size, but the one that is saved after build and archive is only 1.4MB (the update involves a lot of added images), so is the build for archive is not even getting the new files?
if a clean won't work, try completely removing the derived data folder.
the default location is in /Users/you/Library/Developer/Xcode/DerivedData . if you haven't played with the DerivedData location in preferences, this is likely where you'll find the sub-folder containing the cache.
when i encounter a situation similar to the original question (retaining items i've deleted, or similarly missing items i've added or holding onto project icons i've changed), i perform a clean on my project, close it, hit Deleteā€¦ in the organizer, possibly even remove it from the organizer, possibly even remove from disk and then re-checkout from git if you have it under version control in this way, then re-open the project from scratch.
I figured it out and thought I should post it in case it helped someone else.
I cleaned the project.
Build > Clean - not 100% on what "Clean" is supposed to mean/do, but it allowed the project to build from the current files rather than the old files somehow.

Resources