Error -10000 getting class of Xcode source document via AppleScript

Number:rdar://20673920 Date Originated:2019-06-11T12:04
Status:Closed Resolved:Fixed
Product:Xcode Product Version:11.0 beta (11M336w)
Classification:Incorrect/Unexpected Behavior Reproducible:Always

Please describe the issue:
When a source editor is open in a workspace, the following AppleScript command fails with error -10000:
    tell Xcode to get every source document

It is possible to tell Xcode to get every document, and the first item happens to be a source document, but getting that item’s class fails with the same error.

Please list the steps you took to reproduce the issue:
1. Open a source editor in a workspace in
2. Open Source and run the following AppleScript: tell Xcode to get every document
3. Run the following AppleScript: tell Xcode to get every source document

What did you expect to happen?
Step 3 returns the same object as the second item of the list returned by step 2.

What actually happened?
Error -10000.


Apple says the feature has been removed, but it hasn’t been, at least in Xcode 11.3.1. On the bright side, it works again in 11.3.1.

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!