Commenting keyboard shortcut broken in Xcode 8.3.3 - xcode8

I restarted, rebuilt, changed app name, cleared derived data, reboot again. I literally just deleted and re-downloaded Xcode. I have read and followed dozens of posts across the internet to no avail.
I am unable to try sudo /usr/libexec/xpccachectl as I am missing that command. I tried 'installing additional components' in terminal but that asks for Xcode to have accessibility permission from system preferences. I add it to the list. Run the install components command and it just asks again.

Related

Cmake-gui not coming up on windows

I am using Cmake-gui and it was working fine, suddenly it started crashing. Whenever i try to open it, it gets added to the taskbar but app doesn't open. I waited for many hours also. I tried installing previous versions also but same thing is happening. I am using windows 10 amd Cmake version 3.16.
I solved my issue by removing the following key from the windows registry :
Computer\HKEY_CURRENT_USER\Software\Kitware\CMakeSetup
It contained all the settings of my last run of Cmake. Some of them became invalid due to changes on my system.
Deleting the key has reset the settings to default and cMake-gui launched successfully.

Xcode 8 Beta 4 - Comment Shortcut Disabled

I just updated to Xcode 8 Beta 4 and the shortcut cmd + / to comment a line is not working..
In the dropdown menu it's disabled:
There's a way to activate it again?
I fixed it following the steps here: https://twitter.com/kolpanic/status/763323546814844928
In Terminal: sudo /usr/libexec/xpccachectl
Reboot your system.
If Cmd-/ still doesn't work in Xcode 8 on an OS X 10.11 (and apparently on a macOS Sierra - thanks to #DanBlakemore), and sudo /usr/libexec/xpccachectl and a reboot didn't help, try the following.
Close Xcode.
Open /Applications in Finder, and rename Xcode.app to Xcode2.app (or any other name).
Rename it back to Xcode.app, and relaunch.
It should work now.
The problem seems to be that for whatever reason the system "uninstalls" Xcode extensions at some point, and won't "install" them again. This can be checked by opening Console, and grepping for INSTALL. If you have INSTALLED/UNINSTALLED for com.apple.dt.XcodeBuiltInExtensions, it won't work if UNINSTALLED was the last action on it, and will work it if was INSTALLED.
Figured this out when debugging an Xcode 8 extension.
The script mentioned above didn't work right away for me. I had Xcode 8 and 8.1 GM installed and was working with both of them off and on. I ran the script in the terminal, restarted my computer, opened Xcode and it still didn't work. So then I created a new directory in Applications and moved the GM into that directory. That seemed to fix it.
TL;DR
If you have multiple versions of Xcode installed:
Run in terminal: sudo /usr/libexec/xpccachectl
Restart your computer
Create a new directory in Applications
Move the other version into that directory
Restart Xcode and enjoy!
As explained there, here's a solution that doesn't require a reboot:
Close Xcode
In the Application folder, rename Xcode.app (or similar) to Xcode2.app. You might need to type in your password.
Open Xcode, then close it.
Rename Xcode2.app back to what it was before.
(Optional) Spend 5 minutes wondering why this worked.
Just update to Xcode8 release, then open Xcode8 and restart Mac.
https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
To use the Editor's Comment/Uncomment Selection and Add Documentation commands—as well as other installed Xcode Extensions—on OS X version 10.11, launch Xcode and install additional system components, then restart your Mac. (26106213)
Go to App Store, check for system update(iTunes, MacOSX). Update all of them.
It should be fixed once its done.
I rebooted, now it is working.
Then when I started beta 4 it asked me to "install required components" a second time. Don't know if related or not.
I applied #junjie 's method
sudo /usr/libexec/xpccachectl
It works well on Xcode 8.2.1 (8C1002) only except for specific files.
Then, I found the reason.
/* Comment ...
//*/
This type of comment has made it inoperable.
After the line containing above comment type, "Comment Selection" didn't work.
Erase or change them.
xcode->preferences->key buildings-> filter, search comment
see if there are conflicts for key of "command + / ", if yes, delete others unless "Comment Selection"
enter image description here
This made it for me:
Goto System Preferences -> Keyboard -> Shortcuts -> App Shortcuts
Add a new shortcut like this:
Voila! It works for me!
As you can see the shortcut you choose will also end up besides this command in Editor menu in Xcode.
Before doing any of less or more complicated steps,
Try to quit and relaunch Xcode.
In my case, it has helped.
xcode->preferences->key buildings, or,
"command + ,", then search "comment selection"
change the key "command + /"

ConnectionKit app not opening on other Computers

I created a Mac app that uses ConnectionKit to connect to a server using FTP. Today I went to export the file and use it on another computer only to find that the app does not open entirely on a different computer.
On the development computer, the app functions completely, but on another computer, it opens, the icon stops bouncing in the dock, and the name of the app is shown in the menu bar, but the first view controller and window are never opened.
The menu is also not visible. It just shows the app title and nothing else.
I assume that this has to do with ConnectionKit, but I checked the package contents of the exported bundle and ConnectionKit is in there under Frameworks.
Here are the steps I took to include it.
I downloaded ConnectionKit using git clone
I downloaded each git submodule using git submodule update --recursive --init
I dragged the ConnectionKit.xcodeproj file to my Frameworks directory in the project explorer
I added ConnectionKit from the workspace into the "Link Binary with Libraries" section
I added a new "Copy Files" build phase.
I changed the destination to "Frameworks"
I added the ConnectionKit.framework from the Products of the ConnectionKit.xcodeproj to the copy files phase.
The build phases tab looks like this:
This doesn't seem to work. The application just sits there and doesn't launch the app on any computer other than the development computer.
What am I doing wrong here?
You need to run the app in Xcode under the debugger on one of these other computers. It sounds very likely that you are getting a raise at launch. Seeing the raise in the debugger would doubtless shed light on the cause, which might or might not even have anything to do with ConnectionKit. :-> You could also look at the console logs generated by your app, in Console.app (in Applications/Utilities/), but actually getting the raise in the debugger is generally more useful unless the problem is something very obvious.

How to force-install Xcode 4.3?

I've read through a number of existing StackOverflow questions about Xcode 4 installation woes, but none of them quite match my configuration.
I started off with a MacBook Air with apps sucked over from an older MacBook Pro. During the migration process, it would seem that Xcode.app was pulled over, but /usr/include and friends were left behind.
So, I tried to install Xcode from the app store earlier, and got no feedback except for minutes of 'INSTALLING', with no status and no noticeable network load. I shut down (was running out of battery) and tried again later -- same behavior.
Then, I ran sudo /Developer/Library/uninstall-devtools --mode=all to clean things up, rebooted, and tried again. Now, when I click the 'install' button in the app store, I'm prompted for my credentials, I see a little spinner for a second in the top-left of the window, and the UI reverts to its original state ("Install" as an option, etc.). Subsequent clicks on "Install" trigger the spinner for a second, but have no other noticeable side effects.
Are there any other rituals I should perform to clean my computer of whatever invalid state it's in so that I can get Xcode re-installed so that I can get /usr/include etc. back so that I can start compiling again?
You might try installing the Xcode 4.3 dmg available from https://developer.apple.com/downloads/index.action. At least Installer.app has a log window that might show some useful errors if it fails.
Or if you want to keep trying the App Store version, open Console.app and watch the "All Messages" log while trying the install.

XCode 4 Archive/IPA Error: "The operation couldn’t be completed. No such file or directory"

I've found various proposed solutions to this problem on this internet, but none of them work for me. Does anyone know why this might be happening?
http://answers.unity3d.com/questions/15294/xcode-build-and-archive-error-no-such-file-or-directory
http://blog.joshschumacher.com/2011/04/06/xcode4-the-operation-couldn%E2%80%99t-be-completed-no-such-file-or-directory/
I've tried archiving with every combination of coding signing vs not using code signing, and I've tried using every combination of provisioning profiles, but I still get the same error every time.
I'm very confused as to why I'd even be getting an error like this when trying to save a file. I'm using XCode 4, my application builds for archive fine. In fact, I can even upload my application to itunesconnect (and it was accepted!). I just can't create an IPA for sharing and beta testing before submission.
Any ideas?
The error message
Right before I get the error
After much frustration, I filed a developer support request with Apple. The technician I spoke with was able to save my archive as an .ipa on her computer -- the exact same archive that I was not able to save on mine, which pointed to a possible bug in my system (and from the sounds of it, many other people's).
She recommended that I uninstall and reinstall XCode and the developer tools, and that worked!
Here were her uninstall instructions:
Make sure that your machine is running the latest Mac OS X (10.6.7) and iTunes.
Run the following command in the Terminal application to uninstall your SKD:
sudo <Xcode>/Library/uninstall-devtools --mode=all (where <Xcode> is the path to the directory that contains your SDK.)
Drag your <Xcode> to the trash and restart your machine
Re-download and install Xcode (4.0.2) from the iOS Dev Center. Make sure that the System Tools, UNIX Development, Essentials packages in the Custom Install pane are selected before installing it.
I have the same issue after my distribution certificate was expired. I add new ones (private key and certificate) and xCode "Share" command starts to produce such error.
The problem resolves as soon as I remove old private key & certificate from Keychain Access.
Hope it helps
Selecting "Don't Re-sign" at Identity solved the same issue for me.
I actually had the same problem, but a different solution (and reason). I had Xcode 3 and Xcode 4 both running at one point. I recently deleted Xcode 3 and moved my Xcode 4 from /Xcode4 to /Developer directory. This caused me to have the same issue you describe.
I moved the directory back to /Xcode4 and now my archives save out correctly.
I also had the same problem but I could resolve the problem in the below way.
My project was on the portable disk (formatted as FAT-32) and the project referred some folders on the same disk as "add folder reference for any added folder". I could build it any configurations however I couldn't just make .ipa file with above alert.
So, I copied the referenced folders on the portable disk to the desktop of the disk installed XCode (MacOS). And adding again the folders into the project. I could make .ipa file.
I installed Xcode 4.0.2 in one directory and then manually moved it to another.
When I moved Xcode back to the first directory everything worked.