How to disable Xcode 5 automatically upgrade xibs to iOS7 appearance - xcode

If you open an Xcode 4.x project at Xcode 5 and then open a xib at Interface Builder, you will get an alert:
NOTE: I only have the issues with the forced iOS7 appearance, auto layout is still turned off for me.
And then i accidentally clicked "Alway Upgrade" so Xcode automatically upgrades all my xibs to Xcode 5 and iOS7 prior. But i use Xcode 4.x parallel and it's very annoying to switching back all the xibs when i accidentally open them in Xcode 5.
Before opened in XCode 5 interface builder:
After opened in XCode 5 interface builder:
I searched in Xcode and on Google to get the way to turn this "feature" off, but i still have no luck about it.

In the File Inspector for the xib (cmd-opt-1), you can change the "Opens in" popup to say "Xcode 4.6". This will revert the document format to one that is compatible with Xcode 4.6, but it also means you will not be able to take advantage of some of the new capabilities in Xcode with regards to xibs.
If you want to "reset" the "Always upgrade" choice you made, you can do that by resetting that particular user default using Terminal:
defaults write com.apple.dt.xcode IBAlwaysUpgradeAutolayoutDocuments -bool false

I have tried the above solutions, but as other users pointed out, didn't seem to work well... Strangely, after downloading Cocktail for Mac, and cleaning up broken preference as well as caches and other junk (which I did just to maintain my aging Mac) the "Always Upgrade" mistake was finally fixed!!
I haven't bought cocktail, honestly, you can use it for free for ten launches or something. So, you can go ahead and get your Mac cleaned up and fix that burden along the way.

I modified the Dave DeLong's command to reset the "Always upgrade". Try it.
defaults write com.apple.dt.xcode IBAlwaysUpgradeAutolayoutDocuments -boolean false

I didn't have luck with either of these commands, but this one worked for me...
defaults write com.apple.dt.xcode IBAlwaysUpgradeAutolayoutDocuments -int 0

Related

I updated Xcode by hand -- App Store keeps trying at night

TL;DR: It appears that Xcode now auto-updates overnight if your Mac is connected to power. I did a manual install, but the (stalled) auto-update still tries overnight. How do I kill this zombie? (Yes, I can turn off auto-update in App Store, but I don't want to. And anyway, the problem would persist when/if I turned it back on.)
Longer: The following steps happened
Yesterday morning my Mac had the error dialog (paraphrasing here) "Could not update, you must quit Xcode"
I quit Xcode
Clicked "Update" in App Store app
Update stalled at 90%, App Store said "Pending"
(Simulator was still running; could have been the problem)
This stalling is a common problem, dealt with in many posts here, notably
Xcode update stuck after updating macOS
Xcode update stuck on "update"
I went to https://developer.apple.com/download/more/ and got and
installed the update by hand
That wasn't the end of my problems; see
Broken xib with xcode 10.3
This morning, I was welcomed with the same "Could not update, you
must quit Xcode" error dialog.
The App Store app still says "Pending" for this update. Apparently you used to be able to press the Option or Control-Option keys to reveal a "Cancel" button, but no longer.
Q: How do I cancel this pending update, short of de-installing current Xcode and re-starting the App Store process? (See How to Completely Uninstall Xcode and Clear All Settings)
Note: FWIW the file
~/Library/Application Support/App Store/updatejournal.plist seems to say my latest version is 9.2.
Note: another suggestion at https://apple.stackexchange.com/questions/345910/how-to-delete-partially-downloaded-updates-in-high-sierra is to delete all contents of $TMPDIR../C/com.apple.appstore/ but that seems drastic.
Note: In Launchpad, the Xcode icon has a blue dot next to it. Could my solution really be as simple as deleting the Xcode icon? Plenty of similar suggestions all over the web...
This seemed to do the trick: sudo softwareupdate --clear-catalog

Destination toolbar disappeared on XCode 6.4

Today in the morning I tried to compile my project to run in my device and I found the destination toolbar disappeared and I cannot choose my IOS device or IOS Simulator device as target. (I can do it in the Product/Destination Menu)
After some research I found the >> at the right on the screen and when I pushed a Scheme option appeared but it is disabled and I can't enable again.
This is what I tried with no success:
Open an old project to see if the problem was in my project
Create a new project (with Swift and Objective C but I don't think this make any difference)
Restart my computer
Hide and show the toolbar (View menu/Hide Toolbar and the View menu/Show Toolbar)
I tried all the previous options with the device connected and disconnected
I have installed the IOS Simulator 8.4 (when I run my project it runs in the last selected simulator) and XCode 6.4.
Looks like Xcode hides that menu when the window is a certain size. I have to make my window quite large before it comes back.
Not a fix as such but you can work around it using the menus: Product > Scheme and Product > Destination
You're probably running into the same issue I am. Like #BrandonWilliams said in his answer, it appears again if the Xcode window is wide enough. The underlying cause, for me at least, seems to be that in this build of Xcode (6.4) running on El Capitan beta 2 (with Xcode 7 beta installed), I am seeing duplicate simulators for iOS 8.4. And since there are two of the same version, the Schemes dropdown shows some sort of long GUID next to each one, causing the Scheme dropdown to be quite large:
I came to SO looking for an answer but realized that I had seen this issue before.
So the problem is basically that auto layout sucks (I mean it is not working properly in Xcode 6) and on El Capitan, the destination toolbar is for some reason hiding instead of collapsing properly. So when your Xcode window is narrow, the destination toolbar disappears.
But, if you expand the window far enough, it shows back up again.
In case you can't tell, in the first screenshot, the window is about 1241 pixels wide and in the second screenshot the window is 1541 pixels wide.
Go to Product then Destination and choose at which simulator or device you want to test your build.
I'm running with same problem. You can select device or change scheme using below steps:
Select Product from menu
Select Scheme or Destination
Select required Scheme option or Destination option
Alternative Solution:
The only solution is to use Xcode 7 or above. I've installed Xcode 7.1 and found Scheme/Simulator list available. Refer screenshot.
It seems that Xcode 6 or below doesn't support OS X El Capitan.
I am still seeing this problem in Xcode 7.2 on iMac with resolution 1920x1080. Resizing the XCode windows dens't help. I can have the menu bar back if I push the green button and go to full screen mode. But that's pretty annoying. This is how I finally figure out a solution that works for me. I notice that only if I open the project file that I have been working daily that the menu bar is missing. If I create a new project, the menu bar is there. And here is my solution:
Remove your project file on disc (or move it to a different folder)
Open the Welcome to Xcode window by shift+command+1
Make sure your project is no longer under this list. If it is still there, click on it and Xcode will tell you the project is not found and it will be removed.
Add the project file back and open it and I have my menu bar back (if you have moved it, simply opening it from a different file location may work I guess)
I guess the problem is that some cache value in Xcode about the project file is messed up somehow. Hope this helps.
I make my XCode screen little big and now find both options.
On XCode 9.0 beta, this worked for me: select View -> Show Toolbar from menu
right click on title bar -> select show toolbar
Fixed it by deleting the following file ~/Library/Preferences/com.apple.dt.Xcode.plist and restarting Xcode.
The downside is that Xcode preferences dropped to defaults obviously.

How to disable Xcode 5 Source Control from terminal / command line?

I am using Xcode 5.0.2 and yesterday I did nothing special but used its source control function to check out and update from svn.
Today, Xcode continues crashing over and over again when it launches. I googled a solution that is disabling the source control in Xcode's Preference.
But since it crashes when it launches, I don't have change to go into the Preference Panel to do the operations.
So is there command that I can do in Terminal to disable the source control of Xcode?
!!!UPDATE:
actually this is not the real problem I ran into. I thought my Xcode crash because of the source control issue. So I send this post and got an answer quickly. Thanks #zzyclark .
But after I did as the post in the link said, my Xcode still crash. I've used other way and got the problem done.
I am gonna keep this post for the people who really want to disable Xcode source control in Terminal.
But if the admin think this is not the propriety. You could delete this post.
rather than close it in terminal, can u check this. This is used to disable the version control of xcode 4 by modifying the file name extension.Can you disable version control integration in Xcode 4

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

Stop Xcode from memorize my previous opened projects

This really drives me bunker! At any time, I work on multiple projects. When I quit Xcode, the next time I open Xcode, all my projects from the day before open automatically one by one.
Often I end up editing the wrong file, AHHHHHHHHHHH!! The only way I could stop this behavior is by closing all projects before quitting Xcode, go to Open Recent, select Clear Menu, and go to Organizer to delete all projects one by one. There must be a easier way to stop Xcode from "memorizing" my projects.
I had asked Apple numerous times, but Apple people kept telling me to go to Xcode Preferences to turn it off and often they seem to have confused it with the Mountain Lion's Reopen Preferences which I had it turned off. I found no such option in my Xcode 4.5.2 and Apple people insist it is there.
Does any of you have that option on your Xcode 4.5.2? Or did Apple single me out to omit that option, just to piss me off? Mostly importantly, how can I stop this nuisance? When I restart the Xcode, I want a clean start >:|
Thanks.
You can modify the setting whether an application reloads its windows as shown in this question.
Xcode's identifier is com.apple.dt.Xcode so the command for changing the default is
defaults write com.apple.dt.Xcode NSQuitAlwaysKeepsWindows -bool NO
In my testing it can take one or two re-launches to stick.
If you just want to close all windows once you can also use Quit and Close All Windows (⌘⌥Q)
System Preferences > General > Close windows when quitting an application
Here you can find a checkbox to disable the "feature". Also, see this similar question.
For Xcode Version 6.3 (6D570)
Delete this directory
~/Library/Saved Application State/com.apple.dt.Xcode.savedState

Resources