James Pierce
James Pierce

Reputation: 558

Running iOS Simulator on Network User Accounts

I help manage a Mac-based graphics labs and I teach web design for my university's art department. I installed Xcode and the iPhone SDK/simulator so that the students can have experience testing websites on mobile devices (such as the iPhone or iPad). The simulator works just fine when logged in as the local admin user for the computer, however the iOS simulator fails to launch when logged in with one of the student accounts (which are hosted from Snow Leopard Server) or any other networked account.

The simulator begins to launch (and the application does open) but it gives me this message:

The simulated application quit.

Click Relaunch to try again.

My options are "Quit", "Switch SDK..." or "Relaunch".

Is it possible for the simulator to launch using a network account? If so, does anybody know how?

The client computers are running Mac OS 10.6.8 and the server is also on 10.6.8. I'm using Xcode 4.2 with the iOS 5 SDK (for Snow Leopard).

Thanks in advance.

Upvotes: 3

Views: 1772

Answers (2)

John Flynn
John Flynn

Reputation: 1

It seems that with every new OS X and Xcode release, something else breaks with regard to running Xcode on network home directories.

Our method of getting around this was to have students set their Derived Data location to /tmp/username in Xcode settings. This will create that folder when they try to build a project. Then we can place a symbolic link, ~/Library/Developer/CoreSimulator -> /tmp/username and this way the iOS Simulator will work for them.

Also, having Derived Data in /tmp/username really improves build performance and reliability.

I don't think many people use OS X and Xcode in this configuration; it's very common in university computer labs where you need to have students able to log into any workstation and have their own environment. I wouldn't mind it so much if they didn't change something new every year which breaks Xcode causing us to have to fix it all over again.

Upvotes: 0

tmkly3
tmkly3

Reputation: 3299

I had the exact same problem, for some reason the iPhone Simulator doesn't like it when the ~/Library/Application Support/iPhone Simulator directory isn't on the local volume.

Here's the fix/workaround:

rm -Rf "~/Library/Application Support/iPhone Simulator"
mkdir "/Developer/Local/$USER/.iPhoneSimulator"
ln -s "/Developer/Local/$USER/.iPhoneSimulator" "~/Library/Application Support/iPhone Simulator"

Using the /Developer/Local directory is totally arbitrary, as long as you choose a place on the same drive as the iPhone simulator it will work. Of course, /Developer/Local/$USER should also have the correct permissions so $USER can actually use it.

Cheers

Upvotes: 2

Related Questions