9
我在使用AppleScript將文件夾複製到XCode項目時遇到了一些麻煩。沒有Applescript我將文件夾拖入Xcode。蘋果將文件夾複製到Xcode中?
我已經使用了類似的Applescript處理程序,如下所示,使用「wrapper.library」將文件類型複製到XCode中。下面我使用「wrapper.folder」嘗試將文件夾複製到XCode中,但它不起作用。
on addFolder(fname, fpath)
tell application "Xcode"
tell project "Unity-iPhone"
set my_targets to targets
set s_target to item 1 of my_targets
set compile_phase to compile sources phase of s_target
set link_phase to get link binary with libraries phase of s_target
tell root group
set a to make new file reference with properties {full path:fpath & fname, name:fname, file type:"wrapper.folder"}
add a to link_phase
end tell
end tell
end tell
end addFolder
有沒有人有任何想法,我缺少什麼或如何編寫一個Applescript複製到XCode文件夾?
我很想知道你是怎麼解決這個問題的...... – 2012-01-12 17:17:20
這個Xcode插件可能有幫助:https://github.com/larsxschneider/Xcode-Scripting-Interface – 2011-11-28 08:23:29