-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[video_player_avfoundation] Adds Swift Package Manager compatibility #6675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[video_player_avfoundation] Adds Swift Package Manager compatibility #6675
Conversation
@@ -4,7 +4,7 @@ | |||
// Autogenerated from Pigeon (v18.0.0), do not edit directly. | |||
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this manually. This will get overwritten by pigeon until flutter/flutter#147587 is fixed.
@@ -5,7 +5,7 @@ | |||
import Cocoa | |||
import FlutterMacOS | |||
|
|||
@NSApplicationMain | |||
@main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NSApplicationMain
was deprecated, tool migrated it: flutter/flutter#146848
@@ -9,6 +9,7 @@ | |||
/* 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -2,7 +2,7 @@ name: video_player_avfoundation | |||
description: iOS and macOS implementation of the video_player plugin. | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to a minor bump
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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_avfoundation
available 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.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to 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.