Skip to content

Abstract Apple platforms in ffigen config #1509

Open
@stuartmorgan-g

Description

@stuartmorgan-g

Currently to write Dart code that will run on both iOS and macOS and uses a system SDK that supports both, I have to pick one of the two platforms arbitrarily to list header entry points for, as the paths are platform-specific. E.g.: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFoundation.framework/Versions/A/Headers/AVFoundation.h

It would be nice to be able to put a placeholder in place of the whole platform-specific sub-path, and then list the platforms in the config via something like:

headers:
  platforms:
    - ios
    - macos
  entry-points:
    ...

and have ffigen create the necessary paths for both and then merge the output of using both.

(See also #471 and #1469 for related issues.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions