[ObjectiveC] Invalid bindings generated for AVFAudio framework
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 47
Description
# Context
I was playing around with the objective_c example and using a glob for the entrypoint: `AVFAudio.framework/**.h` instead of `AVFAudio.framework/Headers/AVAudioPlayer.h`. I noticed a few issues with the generated bindings.
# Issues
There are 2 issues that I noticed with the bindings (#578 and dart-lang/native#452), and 1 more general issue with some of the interfaces being included:
## Objective C interfaces are included, even if not referenced from an included interface with `exclude-all-by-default: true`
I'm not sure why the `AVAudioNode` is included, except perhaps that there's a section in `AVAudioPlayer.h`:
```c++
#if __has_include()
#import
#endif
```
And, since I am using a glob pattern for the entry points, `AVAudioSession.h` was included and **it** indirectly references `AVAudioNode`. I think the way we're filtering out declarations may need to be more granular. This also could reduce the size of generated bindings, in general.
Contributor guide
Assessment
This issue has not been assessed yet.