Xcode 6.1.1 GM Seed and _kLSApplicationLockedInStoppedStateKey.

This just cost me an hour or so, and I see little mention of it on the Internet.

Because of bugs involving Swift in Xcode 6.1 (Build: 6A1052d) I was desperate to move to Xcode 6.1.1 pre-release version.

I uninstalled Xcode 6.1. I scanned for other Xcode-related files left behind and deleted ones that had a high likelihood of not being essential. For example, I left /usr/bin/xcodebuild alone because it is part of the com.apple.pkg.Essentials package whereas I deleted the files in /Users/me/Library/Developer/Xcode.

I downloaded and installed Xcode 6.1.1. After installation, I tried to start it. A small window appeared that floated on top of everything. It told me that Xcode was being verified. The progress bar took a long time to finish and several moments after it had finished, a dialog popped up to replace the tiny verify progress window. The dialog was the usual warning that you have downloaded this app from the Internet, are you sure you want to open it? I clicked the button that indicated yes, I want to open the app.

Nothing useful happens. After restarting, trying it all again, getting the same result, I found this log entry on the Console:

11/23/14 6:32:47.962 PM launchservicesd[54]: Someone attempted to start application App:"Xcode" asn:0x0-2c02c pid:367 refs=5 @ 0x7f81cae47bc0 but it still has _kLSApplicationLockedInStoppedStateKey=true, so it is is staying stopped. : LASApplication.cp #2517 SetApplicationInStoppedState() q=LSSession 100005/0x186a5 queue

I fiddled around trying different things, and with every attempt I had to wait a long time for the Xcode verification process to finish before finding out if my attempt was successful or not. I even went into System Preferences > Security & Privacy and set "Allow apps downloaded from:" to the value "Anywhere". That did not help. I really hope I remember to set it back.

If you search the Apple Developer Forums for "_kLSApplicationLockedInStoppedStateKey" you'll get one hit from August this year. Reading the post and response, it seems like it was just a one time thing for that user. He kept trying to open Xcode, and eventually it worked!

I gave it a shot. I clicked the Xcode icon in the Dock maybe 20 or 30 times in rapid succession. And it seemed to have worked! Xcode opened! I can open my project in Xcode again. I'm scared to press Build. I'm scared to close the Xcode app. Right now, I'm very scared to run the Simulator.

Right now, I am traumatized. I rarely have this kind of opaque problem with Apple products, even their development tools. This is the first time I've use pre-release development tools, however. It was a horrible reminder of being back on other OSs where I spent too much of my time wrestling with it instead of being productive. I really hate that.

No comments:

Post a Comment