Search code examples
objective-ciosxcodeuncrustify

Running Uncrustify by selecting Behavior in Xcode does nothing


I installed Uncrustify as per the instructions here:

http://noiseandheat.com/blog/2012/01/uncrustifying-objective-c-source-in-xcode-4/

Used brew for installation and added new behavior in Xcode(4.3.2) preferences.

However running the behavior from the menu does nothing. What might I be missing?


Solution

  • Thanks Thomas, resource provided by you was very useful and allowed me to add automator workflows into Xcode. Only problem is that script "Uncrustify Document then Re-Indent" is showing an error "System Events got an error: Access for assistive devices is disabled". Initially I sudo touch /private/var/db/.AccessibilityAPIEnabled to enable assistive devices but this did not help. I found a thread on similar issue here: AppleScript - System Events Error : Access for assistive devices is disabled

    fanaugen says:

    The problem is not the assistive devices. AppleScript seems to incorrectly return that error code when it tries to access windows of a process that can never have any windows

    and he suggest to rewrite script with some changes. I am not sure if it is actually the same issue here and it's first time I am having to deal with this type of script, so I am lacking of knowledge here. Do you have any advice? Did you have a similar issue?