Build and Run doesn't update iOS Simulator when user folder on another volume

Originator:patrick.mccarron
Number:rdar://8915498 Date Originated:1/25/2011
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 3.2.5, iOS SDK 4.2.1
Classification:Serious Bug Reproducible:Always
 
Summary:

Recently I added a SSD as the boot drive of my MacPro. In doing so I moved my user's home folder to another drive (volume) on the machine. 

After this I noticed that when doing a Xcode Build & Run of an iOS App on the iOS Simulator, no further updates will be made to that app without either exiting the Simulator or force quitting it from the Springboard. 

This is quite a problem because it makes it look like the app is actually restarting itself, but actually it is simply just switching away and back to the Application. A developer could spend a good amount of time trying to figure out why a code change isn't happening, as it's not immediately apparent that the app isn't updating itself as expected.

Steps to Reproduce:

Requirements: A Mac that has multiple volumes, all to be used must be formatted as HFS+. 

1. Create a new Mac OS X User in System Preferences, Accounts. 
     I created an Admin User
2. After it's created, copy it's user profile to folder another volume. 
     I used the following ditto command:
     sudo ditto -rsrc "/Users/USERNAME" "/Volumes/OTHERVOLUME/USERNAME"
3. Change the Home Directory of the new User to the new location set it Step 2
     Instructions: 1) Goto: System Preferences, Accounts. 
                             2) Right click on the new User, select Advanced Options. 
                             3) Assign Home Directory to the directory from Step 2.
4. Log out and back Log in as the new User.
5. Open Xcode
6. Open any iOS Project
7. Set Xcode to do a iOS Simulator mode
8. Build & Run to launch the Project in the iOS Simulator
9. After the Application is running, now make a change in the code in Xcode
10. Now tell Xcode to do Build & Go again

Expected Results:

I expect that Xcode will terminate the currently simulated iOS application, and then replace it with the newly built binary, and relaunch it. 

Actual Results:

Instead Xcode just tells the simulated iOS application to go into the background, and then quickly reopens the same Application again without replacing the iOS Simulator Binary with the newly built and updated Binary. This is different from how it works on a normal Mac OS install.

I see no error messages in the Console that indicate any clearly defined problem. 

If you terminate the iOS Simulator or Force Quit the iOS Simulated App between steps 9 and 10 above, then it will work as expected. This adds an extra few steps to the process that makes it quite a bit more annoying to develop on.

Regression:

This does NOT occur on the same machine if the User folder is on the same Volume as the rest of the Mac OS and Developer Tools. This still occurs in the current iOS 4.3 SDK Betas as well. 

Notes:

The easy solution is to just not move my User folder to another Volume, but if the functionality to do this is in Mac OS I expect the developer tools to be able to handle this situation, despite how rare it may be.

Comments

FIXED Solution still works in Xcode 4.0.2

Happy to say jfeldman's solution above still works in Xcode 4!

Thank you so much jfeldman!!!

FIXED

I have been struggling with this as well, and it sucks. But I finally found a solution. Delete ~/Library/Application Support/iPhone Simulator. Then create a new folder in /Library/Application Support/iPhone Simulator. Then in terminal create a symlink in your user's Application Support/iPhone Simulator folder to the systems Application Support/iPhone Simulator.

Doing this ensures that the simulator's runtime and the installed applications exist on the same drive. I have no idea why the runtime cannot overwrite the application if it exists on a different partition or drive...I am assuming the first symlink from the user's folder throws it off.

But this does fix the issue, it made my day today!

By jfeldman.mobile at Feb. 12, 2011, 4:40 p.m. (reply...)

Unfun

This is especially unfun when your only machine is a 27" iMac (256GB SSD, 1TB HD) without enough comfortable room for you Home folder on the SSD. Thanks for filing a bug.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!