Skip to content

Instantly share code, notes, and snippets.

@rudifa
Last active May 17, 2023 09:33
Show Gist options
  • Save rudifa/d96dfd74f99e37d0393ac014ddadcac4 to your computer and use it in GitHub Desktop.
Save rudifa/d96dfd74f99e37d0393ac014ddadcac4 to your computer and use it in GitHub Desktop.
Register Xcode.app
#!/bin/bash
# problem:
# you installed a new version of Xcode, and now the previously installed extensions are
# not visible any more in menus or accessible via custom keyboard shortcuts
# solution:
# https://nshipster.com/xcode-source-extensions/
# ... when multiple copies of Xcode are on the same machine, extensions can stop working completely. In this case, Apple Developer Relations suggests re-registering your main copy of Xcode with Launch Services.
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f /Applications/Xcode.app
@rudifa
Copy link
Author

rudifa commented May 17, 2023

The problem of loss of app bindings (menu and keyboard) occurs sometimes with updating the swiftformat Xcode extension.

Registering Xcode with this script usually fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment