Hi all,
I am new to Applescript and this is my first post here. I have search the web for a week now and could not find a solution.
I want to use an Applescript to modify a Xcode project. I want to add a framework to the “link binary with libraries phase” like I would do manually by pressing the + button.
Here is my code:
on run {}
addFolder()
end run
on addFolder()
tell application "Xcode"
open "/Users/sdansereau/Desktop/xcode projects/TestApplescript"
tell project "TestApplescript"
set my_targets to targets
set s_target to item 1 of my_targets
set link_phase to get link binary with libraries phase of s_target
tell link_phase
set new_ref to make new item reference with properties {name:"AddressBook.framework", path type:current SDK relative, path:"System/Library/Frameworks/AddressBook.framework", full path:"/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AddressBook.framework"}
end tell
add new_ref to link_phase
end tell
end tell
end addFolder
I get the following error :
error “Xcode got an error: Can’t make or move that element into that container.” number -10024
Can someone help me please?
Simon