ios - AppleScript to create a duplicate of Xcode target -
ios - AppleScript to create a duplicate of Xcode target -
is there way create duplicate of target using applescript. using below code shows error : xcode got error: targets can not copied.
tell application "xcode" tell active workspace document set firstproject (get first project) set firsttarget (get sec target of firstproject) tell application "xcode" duplicate firsttarget end tell end tell above scripts project open in xcode.
i have different approach accomplish not getting how create work.
open xcode project
tell application "finder" open posix file "/users/testuser/desktop/cobranding/source/tet/test.xcodeproj" end tell
choose particular target , and select (keep focus on it)
tell application "xcode" tell active workspace document set firstproject (get first project) set projectdirectory (get project directory of firstproject) end tell end tell
now press duplicate under edit menu using scheme events of apple scripts.
you can utilize script
tell application "xcode" activate delay 3 tell active workspace document set my_project (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 only 1 thing needed xcode project should active :) luck
ios xcode cocoa-touch cocoa applescript
Comments
Post a Comment