Re: Applescript support in Xcode4
Re: Applescript support in Xcode4
- Subject: Re: Applescript support in Xcode4
- From: Deivy Petrescu <email@hidden>
- Date: Wed, 22 Jun 2011 09:55:54 -0400
On Jun 21, 2011, at 22:52 , Dmitry Markman wrote:
> Hi
> I was asking questions about Applescript support for Xcode4 few times
> and didn't get any answer. (and yes, I sent question to the applescript list as well with the same result)
>
> I think I was polite, question wasn't off topic
> not even one Apple engineer answered
> I understand they don't have to, but still
> that is weird.
>
> I submitted few bugreports related to Applescript support in Xcode, one of them about 4 years ago
> none of them are fixed
>
> if Apple doesn't support Applescript in Xcode, just say so
> but it looks like there is no any testing (or almost there is no testing) for Xcode AppleScript dictionary.
> and in Xcode 4 it is complete disaster.
>
> if something worked in Xcode 3.2.6, in Xcode 4 practically nothing works, zero.
>
> I'm working for big and very respectable company
> we have thousand and thousands files, literally millions lines of code (C/C++/Java)
>
> so we need to organize our code.
> we need autogenerate our projects.
> It is relatively easy for VisualStudio,
> so Mac programmers like to have autogenerated
> Xcode projects as well.
>
> Apple doesn't publish Xcode project format
> I don't want to use reverse engineering (I'm aware about open source that do just that)
> so we have only one path to generate Xcode projects - AppleScript
>
> I managed to create script that successfully does it, but I must admit it was a pain in the ass (sorry)
> but with "System Events" scriptability help I was successful
>
> unfortunately Xcode4 broke practically everything
> yes I submitted bugreport (3-4 months ago - no answer)
>
>
> Apple didn't publish any transition guide related to AppleScript support, even simple things don't work
> say I want to set build setting
> in Xcode 3.X it works
> set project_path to "/Users/Shared/Scripts/Xcode_test/Xcode_test.xcodeproj"
> set project_file to POSIX file project_path as alias
> set sandbox to "/path/to/sandbox"
> tell application id "com.apple.Xcode"
> open project_file
> activate
> set my_project to active project document
> tell my_project
> delete every build setting of every build configuration
> set value of build setting "SANDBOX" of every build configuration to sandbox
> end tell
> end tell
>
> in Xcode 4 it failed:
> set project_path to "/Users/Shared/Scripts/Xcode4_test/Xcode4_test.xcodeproj"
> set project_file to POSIX file project_path as alias
> set sandbox to "/path/to/sandbox"
> tell application id "com.apple.dt.Xcode"
> open project_file
> activate
> set my_work_space to active workspace document
> set my_project to item 1 of projects of my_work_space
> tell my_project
> delete every build setting of every build configuration --ok
> set value of build setting "SANDBOX" of every build configuration to sandbox --error
> end tell
> end tell
>
>
> iI'm getting the following error:
>
> error "Xcode got an error: Can’t set build setting \"SANDBOX\" of every build configuration of project \"Xcode4_test\" of workspace document \"project.xcworkspace\" to \"/path/to/sandbox\"." number -10006 from build setting "SANDBOX" of every build configuration of project "Xcode4_test" of workspace document "project.xcworkspace"
>
> so what's wrong?
>
> I was able to add targets (from target templates), now there is no target templates (why BTW), so I can not autogenerate targets
> or maybe I can, I just don't know how (well System Events to the rescue, but that means that I can not send my AppleScript application to background)
>
> I'm just desperate :-(
>
> sorry if I upset somebody,
>
> Dmitry Markman, PhD
Dmitry,
I am surprised it worked in Xcode 3.
From what I understand you deleted every build setting, this should have deleted the "SANDBOX" setting as well.
So it is not surprise it can not set it to anything.
Also, when I was running it here, I did not get a list when working with " my_work_space"
"item 1 of" returned an error
Deivy Petrescu
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden