Skip to content

Bug: Functions lack return values on Mojave / Xcode 10 #18

Open
@bdkjones

Description

@bdkjones

Here is part of Finder.h generated in Objective-C, following Apple's usual instructions:

screen shot 2018-10-03 at 16 41 25

And here is what gets generated for the Swift API:

screen shot 2018-10-03 at 16 47 41

The Issue

Notice that in the ObjC version, -items returns an SBElementArray of FinderItem objects. In the Swift version, items() returns void. This is not correct and completely breaks the API.

Manually changing the Swift file to:

@objc optional func items() -> SBElementArray

Causes items() to return the expected value, which can then be used. I do not see how a void return can be appropriate here and believe this is a bug with the scripts translating the sdef into Swift.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions