Created
February 17, 2017 22:18
-
-
Save hirad/bc7e3732ddf509da02b1d6d5a56798f5 to your computer and use it in GitHub Desktop.
AppleScript to clean Xcode project, quit it, nuke derived data, re-open it and build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Xcode" | |
set workspaceFile to file of active workspace document | |
tell active workspace document | |
set res to (clean it) | |
repeat | |
if completed of res is true then | |
exit repeat | |
end if | |
delay 1.0 | |
end repeat | |
end tell | |
activate | |
quit | |
end tell | |
tell application "Finder" | |
set ddFolder to POSIX file "/Users/hiradmotamed/Library/Developer/Xcode/DerivedData" | |
delete ddFolder | |
end tell | |
tell application "Xcode" | |
delay 4.0 | |
activate | |
open workspaceFile | |
delay 2.0 | |
tell application "System Events" to keystroke "u" using {command down, shift down} | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment