Skip to content

feat(spm): Package.swift for package_info_plus_tvos - #31

Merged
MAUstaoglu merged 2 commits into
fluttertv:mainfrom
Pixette:feat/spm-package-info-plus
Nov 9, 2026
Merged

MAUstaoglu merged 2 commits into
fluttertv:mainfrom
Pixette:feat/spm-package-info-plus

Conversation

@Pixette

@Pixette Pixette commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a tvos/Package.swift to package_info_plus_tvos, so flutter-tvos links it through Swift Package Manager instead of CocoaPods. The June SwiftPM pass covered the Swift method-channel plugins. This one was left out because it is Objective-C.

One Objective-C target over the unchanged Classes/, public headers in include/package_info_plus. Sources, Dart code and the podspec are unchanged apart from the version bump.

Split out of #27 as suggested in the review there. The Firebase ports stay in #27 and move to SwiftPM together.

Package(s) touched: package_info_plus_tvos

How was it tested?

  • Ran the package's example/ app
  • Verified on tvOS simulator (version: tvOS 27.0, Xcode 27.0, Apple TV 4K 3rd generation)
  • Verified on a physical Apple TV (model / tvOS version: ___)
  • dart analyze is clean for the package (no Dart changes)

Builds, all with flutter-tvos on Xcode 27:

  • The example/ app: simulator debug and release. It runs and shows the real app name, bundle ID, version 1.2.3, build 4 and install times.
  • A fresh app with only package_info_plus + this package: simulator debug, release and profile, and device release with --no-codesign.
  • The same app with path_provider_tvos and shared_preferences_tvos (both already on SwiftPM): simulator debug and release, all three plugins working.
  • In every build the generated FlutterGeneratedPluginSwiftPackage links package-info-plus-tvos, and no pod is installed for it.

I also use this exact Package.swift in a production app (Pixette, a photo slideshow).

check_repo.py . and --selftest pass.

Example app: its old Runner.xcodeproj had no reference to FlutterGeneratedPluginSwiftPackage, so the example failed once the plugin shipped a Package.swift. I regenerated it after url_launcher_tvos/example: package reference, a Podfile that skips plugins with a Package.swift, and no MetalLibInterposer. The deployment target is now 15.0, because Xcode 27 rejects 13.0 for the simulator. Bundle ID and display name are unchanged. The other examples still on 13.0 (for example url_launcher_tvos, path_provider_tvos, shared_preferences_tvos) will hit the same deployment-target error on Xcode 27. I left them alone to keep this PR to one package.

Versioning & changelog

  • Bumped version: in pubspec.yaml: 0.0.1 → 0.0.2, with the podspec's s.version to match.
  • Added a matching entry at the top of CHANGELOG.md, under a heading identical to the new version
  • The entry calls out any behaviour change: the package is now linked through SwiftPM and left out of the Podfile. No API change.
  • Version choice follows semver for 0.x: patch, as in the June SwiftPM pass

Checklist

🤖 Generated with Claude Code

The June SwiftPM pass covered the Swift method-channel plugins. This one was
left on CocoaPods because it is Objective-C. One Objective-C target over the
unchanged Classes/, public headers in include/package_info_plus.

Split out of #27 as the reviewer asked. Patch bump to 0.0.2 with a CHANGELOG
entry and a README note. No API change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Pixette
Pixette marked this pull request as draft November 9, 2026 07:09
…r SwiftPM

With tvos/Package.swift, flutter-tvos links the plugin through SwiftPM, and the
example's old Runner.xcodeproj had no reference to the generated
FlutterGeneratedPluginSwiftPackage, so the example failed to build. The project
now follows url_launcher_tvos's example: package reference, Podfile that skips
plugins with a Package.swift, no MetalLibInterposer. AppDelegate and Info.plist
take flutter-tvos's UIScene migration. Deployment target 15.0, since Xcode 27
rejects 13.0 for the simulator. Bundle id and display name unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Pixette
Pixette marked this pull request as ready for review November 9, 2026 07:20

@MAUstaoglu MAUstaoglu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks for splitting it out. CI is green.

@MAUstaoglu
MAUstaoglu merged commit 7bbe392 into fluttertv:main Nov 9, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants