Im using xcode 8.3.3 and I've recently started playing around in swift.
Im not sure if its just me but i feel like swifts debugging capabilities are completely broken, but at the same time, no one else seems to be complaining so i can only assume this is something wrong with my configuration.
If you look at the image below, you can see than calendar in the variable view doesn't have a property called title (or at least it wasn't visible to me at all), but using po shows it. You can also see that most objects drill down to nothing (ie; [0] id properties, is something supposed to be there?). At the same time, name and name2 is nonexistant in the variable view window. This can be problematic when debugging/inspecting properties for a class.
Ive had this issue since i tried to hop on the swift bandwagon back when 2.3 was the latest version. Because of this, I've ended up reverting back to objective-c every time i need add to my existing app.
Related
I'm working with Xcode interface builder to create UI for Xamairn.iOS native application. It is working fine but from last 6 days, it's giving the error when I'm trying to open the Main.Storyboard with Xcode. If i create the new project and try to use xcode for ui it works but after one or two time work it also gives this error!
I have got the solution today, I hope this will help someone one or another way!
I have used Xamarin.iOS.MaterialComponents 39.0.0 for creating FloatingActionButton as it's required in my app, but because of this component, I'm not able to modify my Main.Storyboard using Xcode. Today, I have removed that package from my app and it started working with Xcode exactly the way I want it to work.
So, the problem is in the package's new version(i.e., 39.0.0). How I'm that much sure? Because I have used it's 35.2.0 version as I have to use a floating action button and it's working like charm.
I have posted the issue on https://github.com/ilap/MaterialComponentsXamarin/issues/2 hope that it will get resolved soon.
I noticed that Xcode 7.3 always keep building, even in idle time. This loads CPU much, so sometimes it stops responding. Does anyone have an idea how to turn of this "feature"?
This may be related with mutli-target workspace, cause usually it builds different targets, not currently selected.
After some time struggling this, I finally solved this issue.
Xcode started idle build right after I open Interface Builder. Removing #IBDesignable across all project solved this, so I hope this issue can be solved in future Xcode updates to get using #IBDesignable again.
in XCode: Editor > Automatically Refresh Views
Unselect it and re-run project. Thats it!
Going along with #oleg-kohtenko's answer, closing all Interface Builder windows seems to fix the issue without the need to remove #IBDesignable.
And if you aren't really using IBDesignable, you can still use IBInspectable attributes without causing the building problem.
Just my two cents if designables agent gets hang on Xcode 9.
If you were visualizing the problematic storyboard as iPhone X, edit such storyboard file as source code (right click -> open as -> source code).
Near the top, you'll see a xml block stating
<device id=“retina5_9” ...>
<adaptation id="fullscreen"/>
</device>
Change the id to “retina5_5” (iPhone plus, just the option I used, I’m assuming others would work).
Save and open the file as interface builder and you should be fine.
Now take the time and file a bug report :D
Happy coding!
I have an Xcode project with, of course, nib files and storyboards. It seems like since I have upgraded to Xcode 7.3, the nibs and storyboards keep automatically updating themselves, thus marking them as modified by git.
This behavior used to happen only when opening the file: Xcode would then update some metadata. But now it seems to keep updating itself even if Xcode is not the active app. More specifically, I can be in Terminal, type > git status and have the expected result of > Your branch is up-to-date. Then, a few seconds later, run > git status again and have myStoryboard.storybardas a modified file. Xcode was never active during that period.
How can I avoid this behavior? Is it something new in Xcode 7.3?
Thank you in advance.
My guess is that this behind-the-scenes auto-modification is exactly to prevent the annoying feature where opening the storyboard file modifies it (and marks it as "dirty"). This way, the storyboard file is already modified (and saved) before you get around to opening it.
All of this has something to do with coordinating between the storyboard and your code, which is a long-standing problem that goes all the way back to the days when Xcode and Interface Builder were two completely separate applications that knew nothing of one another. Xcode today is a forced meld between these two applications, and tries to do all kinds of cute things behind the scenes so that they do know something about one another. What you're seeing is, I'm betting, a consequence of this.
I have a similar situation explain on this thread (XCode 5 Storyboard Internal Inconsistencies), but I installed the final version of the Xcode and never installed any beta version. Additionally, I can't add comments in previous thread cause I don't have enough points. So i need to ask my specific case.
In XCode 5, I have a problem with all of my projects "The document 'main.storyboard' has X internal inconsistencies that were found and repaired. Please save this document to fix the inconsistencies."
If you choose to list the inconsistencies, you see that it's saying that some Images in my resources section, that uses this image, and is duplicating in the Storyboard. I try to save the document, but it does nothing, and when I relaunch the project, I get the same error.
I try all this things with NO SUCCESS:
I delete all duplicates in storyboardFile file.
Drop the image file from my project and add again.
Reconnect UIButtons with the problem image.
Change the image name file.
In my research, also I create a new project in XCode 5, add a same image in two objects inside Storyboard and got the same message.
Anyone have the similar problem?, and more important, anyone have a solution?
I have XCode 5 and OSX 10.8.5.
**** UPDATE *****
I found a workaround. The error is generated when one image inside the storyboard is used several times, if you delete the reference of the image and assign the image to the object by code, the error disappears, but I don't like it. I'll research a little more, but apparently is a bug from Xcode (I hope not).
This problem occurred for me Xcode 10.1 but was resolved. The error message provided a "Show Details" button.
Clicking on Show Details showed my problem, a duplicate.
Right-clicked on the identified storyboard (Main.storyboard) to open as source code.
Searched for the duplicate declarations and removed one of the duplicates.
The error message no longer occurs including when the storyboard is reopened.
An easy way to fix this problem is to open up the Storyboard in TextEdit, then go down to the resources section at the end and delete any duplicate entries for images you see. They're sorted alphabetically, so it's fairly simple to do.
Saved the file, loaded up XCode and no more error messages.
I upgraded to Xcode 5 last night and am experiencing multiple issues, including the one you described above. I also seem to have found a workaround, albeit different from the one you found.
To get rid of it I saved the project, closed it, opened a different project and ran it in the simulator, quit Xcode then reloaded the original project.
Error message no longer appeared.
I have no idea why but this seems to have solved it for me.
Now to tackle the other niggles......... :-/
Same error today after upgrading to Xcode 5: internal inconsistencies relating to images that are used more than once in storyboard, but I found a solution that worked for me here: https://devforums.apple.com/message/883402#883402.
I created a new Asset Catalog (New file / choose "Resource" / Asset Catalog).
Once created, I selected the option 'Import from project' and imported all my images. Seems to have done the trick.
After installing Mavericks and Xcode 5.0.1 the problem was fixed.
Try to find under inferredMetricsTieBreakers section at the end of the storyboard unused segue references in the whole document as in the photo
I've searched all over and haven't found any help...
I built a small test app with two UIViewControllers and their corresponding xibs. Things were fine, then I made some changes to both xibs but when I build and run, I get the old views. I've tried deleting the build folders, running in the simulator and device, cleaning all targets and still the same, old, broke-down xibs that I totally changed are still showing up. I've restarted all the Xcode apps and even my computer.
Getting pretty irritated!
EDIT: I never did figure out what the problem was. Basically, once I had built a project, it remembered the first xibs I made and wouldn't recognize changes to them. If I told a view controller to load from a different, valid nib name, it'd complain that the old one wasn't there.
I reinstalled Xcode and now it all works again. Sheesh.
Try deleting the app from the simulator (hold down on the app's icon to get to jiggle mode, then click the X by the app) and from your device. Then let Xcode reinstall it.
just clean the build using
Product -> Clean
menu.
Just modify your XIB files a bit, then save them, xCode will detect a modification (last modified date in the file system) then load the xib from its actual path, and not from a cache-path :P
I just found (and fixed) a related problem — one that demonstrates similar symptoms but whose root cause is slightly different.
In particular, the symptoms I observed were that my iPad app would initially display an old storyboard image for the first page and, after a short delay, would bring up the most recently edited story board contents. I went through most of the above machinations to no avail.
The problem is that the iPad loader first just dumbly loads your app's launch image into the screen. You usually set up this image as part of the early administrative setup of the app in XCode. At launch time, while the end user is considering the content and cogitating about where to touch the screen, the application is in the mean time madly getting itself ready, un-archiving the xib/nib/storyboard, and doing the real work of getting ready.
In the ideal situation the provided launch image is pixel-for-pixel the same as the one generated by the nib-unarchiving-process. However, if you forgot to update your launch image after updating the story board, you'll see an image shift at the completion of the unarchiving.
I wouldn't have suspected this as the problem except that I had read Jef Raskin's description of how he did exactly this on the Canon Cat word processor to provide the illusion of an instantly ready application: it takes advantage of the fact that the typical human response time to an application startup is on the order of seven seconds — plenty of time for even a floppy-based system to load and overwrite the bitmap facade that the loader sets up. Sometimes, it's good to have read a bit of arcane history. Jef would of course later go on to found a project whose name was Macintosh, and the rest is history — and this bug.
Not sure whether this helps, but I just had this.
It took me days to work it out. In my case I enhanced an existing Xib file. The changes I applied in interface builder never appeared in the app.
Eventually I found the cause. I had my FilesOwner view outlet set to a subview below the top view. When I enhanced the view I did this as an extension to th top view. Thus the changes never appeared when running the app.
Changing the view outlet to the correct view ( the top view in my case ) did the trick and it all worked fine ...
I know steve has found a work around but the problem is not in the XIB files at all. Xcode does not update the YouApplication-info.plist file to
If you open it up you will see the line: Main nib file base name. You must change the value to reflect your desired NIB file name
I had this problem, and it was a result of xcode continuing to copy previously compiled xib's - even though the source file was deleted, the build cache wasn't. Product > Clean and then recompiling solved it.
I just had this issue, just delete the app from the simulator.
Then do a clean on your project.
In xCode,
go to the Product menu,
select Clean.
Or just press Shift+Command+K!
I ended up recreating the xibs from scratch and that worked. Very frustrating.
you can try to modify your XIBs a bit, so xCode will detect a modification through the last modified date in file system. then it will load the xib from its actual path, an not from xCode cache.
I had the same problem, but i solved it by changing the datetime of my system to today. And re-saved the xib. I was testing the local notification.
Just an assumption, not sure if that really caused it: I finished a XIB that worked fine in the simulator and on an actual device. I then changed it to be localised in Xcode 4.5.1. The changes I did after that were not synced to the device until I manually deleted the app from the device and reinstalled via Xcode.
Deleted derived data, cleaned project and build. Old xib was magically removed. :D