Ich brauche ein AppleScript, das ein Xcode-Projekt öffnet und sein letztes Ziel dupliziert.Doppeltes Xcode-Ziel von AppleScript
Ich habe einige Antworten gefunden here und there aber keiner von ihnen scheint zu funktionieren (zumindest mit Xcode 9.1).
Ich habe dies versucht:
do shell script "open <myproject>"
tell application "Xcode"
tell active workspace document
tell first project
duplicate last target
end tell
end tell
end tell
aber es funktioniert nicht mit:
execution error: Error in Xcode: Can not set last target of project 1 of active workspace document to last target of project 1 of active workspace document. (-1006)
Wie würden Sie das tun?