XCode & Interface Builder not in sync anymore - xcode

it seems to me that ever since a recent upgrade to the latest XCode, some behavior changed.
What Used to Be:
Whenever I did a "Build and Run", XCode would ask me to save changes to the opened and changed documents in Interface Builder that belong to that project.
Now:
No questions asked, open IB docs are not saved, and the new build is run without the changes in IB.
In IB, the status light at the bottom of the XIB window is green, indicating at least a sync in the other direction.
I guess this is all a simple preference setting, but you all know that preferences in XCode are as comprehensible as Microsoft Word's.
Thanks for your help

There seem to be a lot of people experiencing this, check out this thread ...
saving-interface-builder-changes-when-building-in-xcode
gary
PS: I am also having this issue since upgrading to 3.2

Related

WidgetKit on Mac with Intent doesn't work

I am trying to make a WidgetKit widget for macOS Big Sur. The widget itself works -- the same code on both the Mac and iOS. The issue is that on the Mac the intent (settings) does not work. When I click "Edit Widget" the options I defined do not appear. When I press "Done," it's replaced with a screen that says "Unable to load."
This seems to happen with a brand new target and just a simple new text parameter. These are the steps I took:
Create a new Mac project
Add a new Widget target
Change the generated Intent, adding a parameter. You also need to add a "Siri Dialog Prompt"
Click "Run"
Click "Info" in the Widget Simulator
Click "Configure Intent"
Am I missing something or is this a bug?
This has been an issue since at least Big Sur beta 5 and Xcode 12b6. I opened a ticket with Apple, but I'm also asking here as it seems that some people have it working and it's entirely possible that I'm missing something!
This seems to be a bug of the Widget Simulator. When I run the same Widget in the Widget panel of Big Sur, I see all configuration options.
The problem turned out to be an older copy of the app on my disk and macOS getting confused and looking in the wrong place.
I'm adding a Widget to an existing app that doesn't currently have one. I have the current, App Store version in /Applications. I've been running the updated version from Xcode or exporting it to my desktop and running it from there. The Widget itself -- as noted in the question -- runs just fine. But it seems that when looking for the Intent used for the configuration, it prefers to look in /Application rather than the Xcode version. As soon as I deleted the original app, the widget and its settings immediately started working.
Thanks to Ely for pointing me to this blog which didn't give the answer but pointing me in the right direction.

Xcode 9.1 simulator stay in front button missing?

There used to be a button called "stay in front" in older versions of ios simulater. I used this often, but in recent updates it seems to be removed. Is there a any way to activate this feature ?
new window menu
old window menu
The option "Stay In Front" for simulator staying on top of all windows is removed from Xcode9 update. Many developers will heartbreak with this including me, but we all know apple has no mercy on developers, and this is not the new thing, we all experience this kind of many things from years. Sorry mates its truth to digest.
Made a report. Please support it, as we all need this functionality
Update 11.01.2018:
Apple closed it as duplicate with no further info. Thank you, Apple.
Update 26.09.2020
They brought it back in Xcode Version 12.0.1 (12A7300)
Thank you, Apple!
Update your Xcode to : v12.0.1

Xcode 7.3 is excruciatingly slow when loading Storyboard IB

I recently upgraded to Xcode 7.3. I found that loading up the storyboard can take anywhere from 5 to 10 minutes to complete(and may sometimes result in a crash). I've restarted my Mac several times. I uninstalled Xcode and reinstalled it to no avail. I then cleared my Derived Data as well as com.apple.dt.Xcode to find that this did not help either. Is anyone experiencing a similar issue and possibly has a solution?
Although this actually might be an issue with incremental changes in Storyboards with Xcode 7.3 you can always speed up build times by creating multiple small Storyboard files in favor of a big bloated Storyboard.
Xcode can then reuse already built Storyboards in subsequent builds (as long as they are not changed) instead of building the complete bloated Storyboard over and over again even for small changes.
Apple even has a guide that might help getting this started.
I hope that helps!
This is really annoying bug/issue with XCode 7.3. So, If you have an hour or so to spend you can download and install XCode 7.3.1 Beta from here https://developer.apple.com/xcode/download/
It seems that this issue has been fixed in this version (at least it works for me).
Edit: OK. After a few minutes, Interface Builder became extremely slow again. Changing only one property can take up to 15-20 minutes.
After some research I have figured out that autolayout constraints were the cause of this issue, BUT only if you have a combination of some components present. I had a segmented control inside a navigation bar. When I removed navigation bar and placed segmented control in a simple UIView, all issues were gone and IB was smooth again.
Hope this will help.
I am using Xcode 7.3.1 and had the same problem. My problem was solved by disabling source control.
Go to Xcode->Preferences->Source Control and then Uncheck the Enable Source Control. Worked for me.
Thanks.
Sometimes the storyboard gets slow because of unresolved errors of autolayout. In my case i tested by changing screensizes and it showed me some errors on different sizes. Once i resolved those errors the storyboard was working fine. Please confirm
Yep I had the same problem. In design mode, it's Autolayout that is causing the 5-10 second delay between edits, especially if it's a large storyboard. Turning off Autolayout in the storyboard at design time fixed the issue for me:
Open project
Select storyboard from the Project Navigator
Open the file inspector
Under Interface Builder Document uncheck 'Use Autolayout'
If you need Autolayout at run time, I recommend you layout your Storyboard in design time with this off (to avoid those long delays between edits) then turn it back on afterwards. Or, turn Auto layout on programatically. Or better yet, split your storyboard out into smaller storyboards.
Referenced this question: Can I disable autolayout for a specific subview at runtime?
I got the same issue recently after I updated the OSX to 10.11. Xcode 7.3 will take almost 5 mintues to respond when I just change the button's font (or anything else change). This made me almost crazy. Incidently, just for a try, I updated Xcode from App Store to 7.3.1. Then I was happy to cry when I opened the storyboard and changed the attributes. Xcode responds smoothly.
So please try Xcode 7.3.1 for your problem. Hopefully you can be happy with it.

Cannot find executable for CFBundle CertUIFramework.axbundle

Just updated to Xcode 5 and this is the first error its throwing on the logger for all my apps. Can't seem to understand why this is happening.
2013-09-19 10:46:54.341 MyApp[1156:a0b] Cannot find executable
for CFBundle 0x8a7c7a0 </Applications/Xcode.app/Contents/Developer/Platforms/
iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/
System/Library/AccessibilityBundles/CertUIFramework.axbundle> (not loaded)
Edit (11-11-2013): To everyone reading, once I waiting for a solid working solution to accept and close. The highest voted answer works until you re-open the project only.
Edit (30-09-2014): I can see this has been sorted since XCode 6 has been released! Finally
Final Edit-
Temporary workaround: click iOS Simulator > Reset Content and
Settings... and run again.
This error message may reappear at random. For me, it happens when I
launch a different application. There are several threads in Apple dev
forums and in StackOverflow about this problem, but none have a
definitive answer. This seems to be a SDK error to be fixed in the
next Xcode version.
Updated: October 3.
CREDIT - Please check this answer - Xcode 5 Error CertUIFramework.axbundle
Further Edit
Although this was potentially the issue resolution at the time. I believe some of the newer answers below relating to the better touch tool are in fact the correct resolutions.
After reading Kirill's answer I did some digging as I didn't want to disable BetterTouchTool for everything just the "iOS Simulator" and you can.
Open the "iOS Simulator" and will it as the active app go to the BTT drop-down menu from the top bar (of that screen if you have more than one) and select "Disable BTT for Current App". It will turn to a play icon when it's disabled.
Make sure the app name on the bar is still "iOS Simulator" as mine jumped to "Finder" a few times when I clicked the top bar!
Now re-set the simulator (if it doesn't work) and rebuild. You shouldn't get the error! :)
Don't forget to clear the error if it's still there. ;)
BTT seems to remember what apps it's disabled for (or at least it does when you close and re-open the app that's disabled I haven't tried a system re-boot yet).
Its easy. Go iOS simulator and reset content and setting.
Thanks
If you are using XCode-5 then just reset the simulator "Reset Content and Settings" and run once again
So I was having this error too in Xcode 5 and 5.1. I wanted to figure out if it's Xcode bug or something else, so I did a fresh install of Mavericks 10.9.2 and Xcode 5.1. Everything seemed fine after multiple tests.
Here is where the problem began. I put the apps and settings that I mostly use and the error came back. So I deleted everything and started adding everything one by one. After couple days I had bingo! The problem is with BetterSnapTool and BetterTouchTool
Update 12.12.2014
Just started using Xcode 6.1 and noticed that this bug seems to be gone at least with Xcode 6.1 simulators and BTT 0.9985 versions.
Update:
As GasB pointed out, it is possible to disable BTT for certain apps. So just disable it for iOS Simulator. You just have to remember not to use gestures while using the simulator as that triggers the error message.
Simple solution:
Remove the ticks in preference pane, reset simulator and do clean build. The error message will disappear.
.
I had the same problem and solved it setting the 'Localization native development region' to match my systems region. In my case from 'en' to 'de'. The referenced files are stored in localized versions in your filesystem. So this setting is used to identify the needed version.
You can find that setting in your project settings at 'Info' -> 'Custom iOS Target Properties'.
Resetting the simulator ‘fixes’ it because it turns the accessibility support off. You can normally achieve the same by simply disabling the ‘Accessibility Inspector’ in the ‘Settings’ app.
If, however, you need it enabled, particularly hate this error message, and are feeling adventurous then you can use the following monkey patches to silence the error: https://gist.github.com/alloy/9277316. (Be sure to NOT include this in your release builds.)
Resetting the simulator is a PITA, I found a way to get rid of these messages without having to to this:
go to Settings > Accessibility
turn on Accessibility Inspector
turn off Accessibility Inspector
quit Simulator
I had this problem with Xcode 5 in ML 10.8.5
I re-installed Mountain Lion (in a Parallels' VM), then update ML to 10.8.5.
Then installrd Xcode 5, and it's worked fine.
I think that the error is caused by a third SW installed in ML.
The application Moom is also causing this issue, and I couldn't find a way to disable it for just the iOS Simulator. So for now I disabled it's accessibility features.
I'm on Mavericks (10.9.3) and encountered the same error in xCode(5.1.1).
I tried anything - reinstalling xCode from both AppStore and dmg. Resetting the emulator resulted in the same error and deleting the Simulator SDK folder gave no results too.
The issue on my end was indeed Moom as mentioned by #aorcsik! Disabling it's accessibility, followed by clean (cmd+shift+k) in xCode cleared the error.
Open Disk Utility and apply Repair Disk Permissions in Macintosh HD.
After doing above step, apply Reset Contents and Settings in iOS Simulator.
This above solution can definitely fix your problem.
I had this problem, and none of the answers in this thread could fix it. Mine was simple UI with a UIDatePicker. I resolved it by removing the UIDatePicker and the associated code, then added them in again. Problem solved!
For me it was Keyboard Maestro, adding the simulator to Maestro's exclude list silenced the warnings

Interface Builder's “Simulate Interface” is gone in xcode 4.6?

Is it possible to 'simulate interface' in xcode 4.6? The command seems to be missing :-(
I am using Xcode 5 and you can find this feature under Editor-> Simulate Document (not the Edit menu) as others have pointed out.
However, this feature is only available for Mac xibs and is not available for iOS xibs.
I am guessing this was probably the same situation in Xcode 4.6 back when the question was originally asked, hence the confusion in the other questions and comments.
Is it possible to 'simulate interface' in xcode 4.6? The command seems to be missing :-(
It seems, NO
In xcode 4.6, you can find from menu bar:
Editor (NOT Edit) menu >> Simulate Document
This one may be helped :)

Resources