Since a couple days ago Xcode keeps expanding all the groups and subgroups in the project navigator.
I have repeatedly collapsed them so I can focus on what I'm working on and then I go back and they're all expanded again.
Has anyone else experienced this?
I collapse a group, move to a different tab in Xcode and then back and the groups are all expanded again.
It's really frustrating as I keep losing track of the files I'm working with.
For a single file, you can open the external file in Xcode and cmd + s to save it, it will be refreshed in Xcode. Also, for the quick way you can just chose the external folder in Xcode and cmd + s , it will refresh all your external file in this folder.
If you hold down the Option key while you click the expand arrow, it will traverse down all nested folders, and open them all up. This also works in reverse if you want to collapse all nested folders. This also works in Xcode!
The Project navigator displays your project's files and lets you open, add, delete, and rearrange those files. To open the Project navigator, at the top of your project window's navigator area, click the icon that resembles a file folder.
OK, I had had enough of this now and decided to try several things out.
Xcode had got to the stage where the project navigator was just broken. I couldn't collapse (permanently) and groups and I couldn't move files around or anything.
In the end what fixed it was deleting the .xcuserstate
file and restarting Xcode.
I lost my tabs and everything but setting them back up took a couple seconds and everything is working fine now.
I also was experiencing this annoying scenario in Xcode 9.2 where the project groups kept expanding themselves.
To fix it:
First, close your project in Xcode. (Otherwise, Xcode will replenish this file upon closing the project.)
Then delete the following file (or move the file somewhere else):
[MyProject].xcodeproj/project.xcworkspace/xcuserdata/[MyUser].xcuserdatad/UserInterfaceState.xcuserstate
Remember to use the "Show Package Contents" option in Finder.
A great shortcut to expand/collapse all Xcode's groups folders is doing cmd + click on any of the group arrow
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With