You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On OS X 10.11, you'll need to run sudo /usr/libexec/xpccachectl, then reboot. On macOS Sierra, they should be loaded by default. Please reopen if you don't see the menu item.
I had the same problem, did run sudo /usr/libexec/xpccachectl and restarted twice, still the same.
What finally did the trick:
In the Xcode project select the clang-format (the extension) target and then edit the scheme ( Product > Scheme > Edit Scheme ... ). In the Info tab of the Run settings set Xcode as the Executable. (By choosing Other... you can browse for the Xcode application on your file system).
Then, when you press the build and run button, a new Xcode application will start up. (After a short while its icon will turn black) The menu item will be available in that Xcode app.
After closing this Xcode and restarting the Xcode you were running before, the normal (blue icon) Xcode will have the clang-format entry in the Editor menu as well.
tamaskenez, DreamerDyh, jbuckner, Norcy, gradha and 5 moreNorcyNorcy
I meant the XcodeClangFormat project, the project this discussion is about. You can download it from github. It has two targets, one is an executable that when run lets you select a style or custom .clang-format file, the other is the extension. It is called clang-format. This is the target for which you may have to edit the Scheme.
I have same problem. And still not fixed after run sudo /usr/libexec/xpccachectl and reboot my macbook. Also try restart xcode, plugin several times.
OSX: 10.11.6 (15G1004)
Xcode: 8.0 (8A218a)
I got this error in console, not sure if it's related.
9/21/2559 BE 13:22:50.216 taskgated[331]: no application identifier provided, can't use provisioning profiles [pid=1533]
9/21/2559 BE 13:22:51.636 lsd[324]: LaunchServices: Could not store lsd-identifiers file at /private/var/db/lsd/com.apple.lsdschemes.plist
@jehnes solutions works! However after quitting Xcode (all instances) clang-format menu item disappears, and i have to run XcodeClangFormat project again.
I could reproduce this issue on a fresh installation of El Capitan with Xcode 8, but I was unable to find a better solution than cloning this repository and following the steps for building this extension.
I have now macOS Sierra, but nothing changed. @jehnes solution still works, but menu item disappears after Xcode quit and i have to run XcodeClangFormat again.
Besides I bought Xformat app on MAS, it claims it adds menu item on Xcode, but it doesn't work.
Activity
Slyv commentedon Sep 15, 2016
I have the same problem.
kkaefer commentedon Sep 15, 2016
On OS X 10.11, you'll need to run
sudo /usr/libexec/xpccachectl
, then reboot. On macOS Sierra, they should be loaded by default. Please reopen if you don't see the menu item.popizdeh commentedon Sep 15, 2016
That didn't help :(
Slyv commentedon Sep 16, 2016
Didn't help.
jehnes commentedon Sep 19, 2016
I had the same problem, did run sudo /usr/libexec/xpccachectl and restarted twice, still the same.
What finally did the trick:
In the Xcode project select the clang-format (the extension) target and then edit the scheme ( Product > Scheme > Edit Scheme ... ). In the Info tab of the Run settings set Xcode as the Executable. (By choosing Other... you can browse for the Xcode application on your file system).
Then, when you press the build and run button, a new Xcode application will start up. (After a short while its icon will turn black) The menu item will be available in that Xcode app.
After closing this Xcode and restarting the Xcode you were running before, the normal (blue icon) Xcode will have the clang-format entry in the Editor menu as well.
popizdeh commentedon Sep 20, 2016
@jehnes "In the Xcode project select the clang-format", what project are you referring to?
jehnes commentedon Sep 21, 2016
I meant the XcodeClangFormat project, the project this discussion is about. You can download it from github. It has two targets, one is an executable that when run lets you select a style or custom .clang-format file, the other is the extension. It is called clang-format. This is the target for which you may have to edit the Scheme.
zinuzoid commentedon Sep 21, 2016
I have same problem. And still not fixed after run
sudo /usr/libexec/xpccachectl
and reboot my macbook. Also try restart xcode, plugin several times.OSX: 10.11.6 (15G1004)
Xcode: 8.0 (8A218a)
I got this error in console, not sure if it's related.
Slyv commentedon Sep 21, 2016
@jehnes solutions works! However after quitting Xcode (all instances) clang-format menu item disappears, and i have to run XcodeClangFormat project again.
kkaefer commentedon Sep 21, 2016
I could reproduce this issue on a fresh installation of El Capitan with Xcode 8, but I was unable to find a better solution than cloning this repository and following the steps for building this extension.
Slyv commentedon Sep 21, 2016
I have now macOS Sierra, but nothing changed. @jehnes solution still works, but menu item disappears after Xcode quit and i have to run XcodeClangFormat again.
Besides I bought Xformat app on MAS, it claims it adds menu item on Xcode, but it doesn't work.
boborz commentedon Sep 21, 2016
could you please give a clear example to show how to install, what you said make me confused...
Slyv commentedon Sep 21, 2016
@libo19931030 For clang-format target set Executable to "Xcode.app" (select Other... and find Xcode in Applications). Then just Run (Command-R).

16 remaining items