[video_player_avfoundation] Adds Swift Package Manager compatibility#6675
Conversation
| // See also: https://pub.dev/packages/pigeon | ||
|
|
||
| #import "messages.g.h" | ||
| #import "./include/video_player_avfoundation/messages.g.h" |
There was a problem hiding this comment.
I changed this manually. This will get overwritten by pigeon until flutter/flutter#147587 is fixed.
| import FlutterMacOS | ||
|
|
||
| @NSApplicationMain | ||
| @main |
There was a problem hiding this comment.
@NSApplicationMain was deprecated, tool migrated it: flutter/flutter#146848
| /* Begin PBXBuildFile section */ | ||
| 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; | ||
| 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; | ||
| 78CF8D742BC5CEA80051231B /* OCMock in Frameworks */ = {isa = PBXBuildFile; productRef = 78CF8D732BC5CEA80051231B /* OCMock */; }; |
There was a problem hiding this comment.
Note: pbxproj file does not contain Swift Package Manager migration changes so that it will continue to build with stable. Migration will happen on the fly.
| .headerSearchPath("include/video_player_avfoundation") | ||
| ] | ||
| ), | ||
| .target( |
There was a problem hiding this comment.
Comment from previous PR by @stuartmorgan:
Interesting, so SPM doesn't allow source filtering without making separate targets?
There was a problem hiding this comment.
Correct, it doesn't allow you to conditionalize by platform very much, only target dependencies, CSettings, CXXSettings, SwiftSettings, and LinkerSettings.
Sources can only be nil or an array of strings
| #import "messages.g.h" | ||
| #import "./include/video_player_avfoundation/AVAssetTrackUtils.h" | ||
| #import "./include/video_player_avfoundation/FVPDisplayLink.h" | ||
| #import "./include/video_player_avfoundation/messages.g.h" |
There was a problem hiding this comment.
Comment from previous PR by @stuartmorgan:
Do we know why include paths aren't taking care of this?
There was a problem hiding this comment.
So for most of the headers, include paths is sufficient. However, messages.g.h is a problem when there's multiple plugins that also have a messages.g.h. Seems like it can't resolve which to use. More explanation here: flutter/flutter#147587 (comment)
So I decided to change all of them to relative paths to keep it uniform
There was a problem hiding this comment.
I'm a little surprised the compilation doesn't scope the search to just the module. Maybe it's the way we have to make all the headers public to make our unit tests work?
We could consider using a different naming convention for Obj-C out from Pigeon in our repo to give them unique names to avoid this, but relative paths are fine too.
| repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_avfoundation | ||
| issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 | ||
| version: 2.5.7 | ||
| version: 2.6.0 |
There was a problem hiding this comment.
Comment from previous PR by @stuartmorgan:
Optional: I would probably make this a minor bump, since it's more of a new feature than a fix.
There was a problem hiding this comment.
I changed it to a minor bump
flutter/packages@8de142d...6c4482a 2024-05-09 15619084+vashworth@users.noreply.github.com [image_picker_ios] Adds Swift Package Manager compatibility (flutter/packages#6696) 2024-05-09 goderbauer@google.com [flutter_lints] Rev to 4.0.0; prepare for publishing (flutter/packages#6695) 2024-05-09 10687576+bparrishMines@users.noreply.github.com [pointer_interceptor] Remove `implements` from app-facing package (flutter/packages#6699) 2024-05-08 15619084+vashworth@users.noreply.github.com Temporarily add empty header files to video_player_avfoundation so include directory is downloaded (flutter/packages#6694) 2024-05-08 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[image_picker_ios] Adds Swift Package Manager compatibility to image_picker_ios (#6617)" (flutter/packages#6693) 2024-05-08 15619084+vashworth@users.noreply.github.com [image_picker_ios] Adds Swift Package Manager compatibility to image_picker_ios (flutter/packages#6617) 2024-05-08 15619084+vashworth@users.noreply.github.com [video_player_avfoundation] Adds Swift Package Manager compatibility (flutter/packages#6675) 2024-05-08 737941+loic-sharma@users.noreply.github.com [ios_platform_images] Add Swift Package Manager support (flutter/packages#6684) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#6675) Makes `video_player_avfoundation` available as a Swift Package to Flutter. Also, remains compatible with CocoaPods. Fixes flutter/flutter#146921. Redo of flutter#6634.
Makes
video_player_avfoundationavailable as a Swift Package to Flutter. Also, remains compatible with CocoaPods.Fixes flutter/flutter#146921.
Redo of #6634.
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.