I am using source tree to manage the version control, a strange thing happened on storyboard/xib.
Source tree detected changes in storyboard/xib files even if I only click the storyboard/xib, not even moving anything in it.
I discard the changes every time if I am not adding or moving stuff in it. But I wonder if I take the changes in the storyboard, is it OK or not? Or there is no difference?
I also wonder what is the reason this happens.
Thanks for any reply.
Edit: the changes are on the toolsVersion = "..." as well as the dependency version
Related
I am having quite the annoying problem with my Xcode storyboard. I have a project controlled through svn version control and everything seems to be copying over fine with the normal merges and commits. When I make a change to the storyboard and commit it, say just a dummy label, and my partner updates his project with the latest commit it shows up fine, just like it is on my own project. However, when my partner adds a dummy label and commits, my update does not show the project on the screen. It only shows the label on the scene viewer. This is also happening with tableviewcontroller's inside of other view controllers, or really anything that he updates. When the app is run the app shows everything that it is expected too, but this does not make sense as the storyboard file is not showing these things. I am not sure what is happening as nothing seemed to be wrong early on. Any help or guidance is appreciated. Here is a picture detailing what I mean.
http://imgur.com/MkJIuhC
If you would like more info about this please leave a comment!
Looks to me like you just need to update the size class when you or your partner opens up your project like so:
and choose whatever size you find appropriate for your app
I was trying to rename an app like I regularly do. I go to the project title at the top left, double tap, and rename the app.
It usually works. However, this time, I have come across a Signal Sigabrt. I tried renaming the project only, but that doesn't work. All of the connections seem to be correct. Here is my error.
This is the first time I have come across a Signal Sigabrt for this reason. Could someone show me what I am doing wrong? Thanks.
Update
When I keep the name of the project the same as the original one, the app runs fine. If I change it to the new one, the app crashes. What should I do?
The screenshot you posted indicates problem in one of your Interface Builder files. Most likely the outlet connections defined there are not correct anymore.
This is a long shot suggestion, but have you been adding and removing objects to the view, or creating and renaming your Outlets? Sometimes this can result in outlets in the xib file which no longer exist in the header or implementation files (I can't explain why this is, although I'm sure there's a reasonable explanation.)
In any case, with the Interface Builder open check the Connections Inspector, which is the button all the way to the right in the Utilities panel. Make sure there are no lingering outlets or actions over there which are not linked to any objects. You may need to cycle through the objects in your view,even the view itself, to make sure you aren't missing any. If there are any of them listed, delete them and try to run the app again.
I have a single view App. very basic not much going on right now besides networking code.
Earlier in the day I committed changes to the main view (added buttons, text fields, styling). I did this by copy+paste -ing from an old project. Everything worked as I expected.
Now, I am on a different machine and pulled the changes in. The App is building with the "old" view (just a single button). Why is it not showing the changes that I made, and were working, earlier?
EDIT: its not just the view that isnt updating. Its running all of the old code from my previous commit. Again, the problem is that I have all up to date files.
this is a Swift app, if it matters.
Deleting the build folder in my project directory fixed my problem.
It sounds like your changes didn't get committed/pushed for some reason. Maybe the XIB/storyboard isn't under source control.
My Xcode project using a storyboard entered in a very weird state recently: Xcode keeps building the whole project and notably the storyboard after each keypress. I found no reason for this behavior neither in my project diffing all interesting files (storyboard and project) neither a setting in Xcode (maybe I just could not find it?) Needless to say that this "feature" makes working on my project nearly impossible since the CPU is constantly occupying with rebuilding the storyboard when I type new code. Anybody seen this?
It is caused by the IB_DESIGNABLE definitions in the source header files. Probably it makes problem only if the header file containing IB_DESIGNABLE is included (even implicitly) to the source file you are currently editing.
I did not find a definitive solution how to disable IB_DESIGNABLE and thus compiling the storyboard and the source files continuously. I would appreciate an Xcode flag to disable this temporarily. I tried also surrounding the IB_DESIGNABLE with #ifdef macros but they are considered even if the #ifdef evaluates to false. Commenting out one by one the IB_DESIGNABLE helps but it is not a feasible solution with many IB_DESIGNABLEs.
Update
I finally found a quick way to avoid this annoying behavior. Having the storyboard opened in the active window, disable "Automatically Refresh Views" from the Editor menu. This will stop updating the views in the storyboard editor that use your custom code and thus speed up your development significantly. When you need again the just-in-time compiling to have a visual preview of your custom code, enable this option again (it seems you also have to re-open your storyboard to make it working again).
You may wish to add a key binding to the command, such as command-option-control-A, to easily toggle the behavior on/off. To add a key binding in Xcode, touch command-comma for preferences, choose the Key Bindings tab, use the search bar to find the command, then double-click on the right area to add your desired keystroke.
"Leave it off" approach
Alternately turn "Automatically Refresh Views" off, and never turn it on.
Make a convenient keystroke for "Refresh all views", say command-option-shift-R
As you work, just touch command-option-shift-R from time to time, or as needed. It's generally only necessary to touch command-option-shift-R as you work on the storyboard.
I had this problem and the accepted answer did not work for me.
The problem I had was that I always keep the storyboard open in it's own tab within XCode so that I can access it quickly.
The only way I could fix it was to either close that tab or select a different file (like a normal code file) and then close and reopen XCode. Thereafter it was no longer rebuilding on each keystroke.
Be warned however if you need to open the storyboard to make changes then this problem can sometimes reappear and I will have to repeat the above process.
Can't wait till Apple fixes this as it is very frustrating indeed!
(ノಠ益ಠ)ノ彡┻━┻
Every now and then I notice my storyboard has changes ('m' beside it). I run my app and find that my views are out of position. If I check the difference between the previous and current versions of the Storybaord XML in the version editor it appears that Storyboard has made changes when I have touched nothing in the file. I have to discard these changes to get things working again. I have to admit that my layout contains warnings. It's incredibly complex (lots of views) but it works and this particularly layout only contains warnings, no errors. Has anyone else noticed this behaviour? It's incredibly annoying. I can fix it by discarding the changes but that's not exactly ideal.
I've been working with storyboard for quite some time. I've faced the issue of getting 'M' besides storyboard. What i did is set the layout constraints correctly and removed all warnings related to auto layout from storyboard but it is not necessary to remove them what i realised later. You just commit the code as you will be using git copy. Once commit is done 'M' will be gone. The reason you are getting 'M' even if you didn't touch the storyboard after you've set layout with constraints can be due to three reasons.
1.) You might be working on local copy and while creating the project you might not have unchecked the git repository.
All you need to do is uncheck while you create new project.
2.) If you are working on source of svn, then you need to commit your all the files along with your storyboard.It will remove the 'M' displaying besides your storyboard.
3.) Every time u open your storyboard the id in xml changes so due to this reason u r getting 'M' besides storyboard.