Skip to content
This repository was archived by the owner on Jan 28, 2024. It is now read-only.

ObjC example #416

Merged
merged 26 commits into from
Jul 8, 2022
Merged

ObjC example #416

merged 26 commits into from
Jul 8, 2022

Conversation

liamappelbe
Copy link
Contributor

@liamappelbe liamappelbe commented Jul 6, 2022

Add an example that uses the AVFAudio framework to play audio files.

Fixes dart-lang/native#245

@liamappelbe liamappelbe marked this pull request as ready for review July 7, 2022 15:52
@liamappelbe liamappelbe requested a review from dcharkes July 7, 2022 15:53
Copy link
Contributor

@dcharkes dcharkes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How cool is this! 😎

Please also add it as test in https://github.com/dart-lang/ffigen/tree/objc_example/test/example_tests so that we run it locally when doing dart test and it's run on the CI.

It is recommended that you filter out just about everything you're not
interested in binding (see the ffigen config in [pubspec.yaml](./pubspec.yaml)).
Virtually all Objective C libraries depend on Apple's internal libraries, which
are huge. Filtering can reduce the generated bindings from millions of lines to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha 😄

@liamappelbe
Copy link
Contributor Author

The example test is failing because the details of the output are going to depend on the version of the libraries that the github bot has. So instead of doing an exact string comparison, I'm going to just grep for each of the classes and methods I'm using and make sure they exist.

@liamappelbe liamappelbe merged commit ecc7c72 into master Jul 8, 2022
@liamappelbe liamappelbe deleted the objc_example branch July 8, 2022 20:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add an Objective C example
2 participants