Storyboard missing constraint every time restart Xcode Storyboard missing constraint every time restart Xcode xcode xcode

Storyboard missing constraint every time restart Xcode


After a simple research I found that this bug could easily be reproduced and doesn't depends on git, storyboard permissions etc. To reproduce it you could just create UILabel without text and set its width to 0. Moreover you don't need to add some additional views, just only one UILabel. To conclude, I think you've found a bug in storyboard, and unfortunately I haven't found any workaround. Probably you should report it https://bugreport.apple.com.


It could be a permissions issue on the Storyboard file that prevents your changes from being saved. Are other changes to the storyboard saved after you exit and reopen Xcode?

You can check the permission on Main.storyboard from Terminal by changing the directory to that of your app + /Base.lproj/

cd ~/Documents/YOUR_APP_CONTAINING_FOLDER/YOUR_APP_NAME/Base.lproj/

and using the command

ls -l

The outputted permissions on Main.storyboard should be -rw-r--r--

If the permissions are normal, does this issue only effect the auto layout constraints of UILabels or all UIElements?


I would fix it, make a git commit to the repo and then try to restart it. It will probably work if you use a VCS