Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

script for duplicate target in Xcode project

Tags:

shell

xcode5

I want to duplicate target of Xcode project with command line, I have searched a lot but not found any solution. I don't have any idea how to write script to duplicate target.

Can anyone help me?

Thanks in advance

like image 530
user123456 Avatar asked Sep 25 '26 04:09

user123456


1 Answers

Please see the code, it worked for me:

tell active workspace document
    set my_project to (get first project)
    tell my_project


        tell application "System Events"
            keystroke "d" using {command down}
            delay 0.5
            tell application process "Xcode"
                --delay 1.0E-3

                click button "Duplicate Only" of window 1


            end tell

        end tell

    end tell
end tell
end tell
like image 161
Prachi Rajput Avatar answered Sep 26 '26 21:09

Prachi Rajput



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!