Skip to content

fix(ios): declare FlutterFramework dependency in Swift package - #240

Open
roberthartman wants to merge 1 commit into
nfcim:developfrom
roberthartman:fix/spm-flutter-framework-dependency
Open

roberthartman wants to merge 1 commit into
nfcim:developfrom
roberthartman:fix/spm-flutter-framework-dependency

Conversation

@roberthartman

@roberthartman roberthartman commented Nov 30, 2026 •

Copy link
Copy Markdown

Summary

  • Declare the FlutterFramework package dependency in ios/flutter_nfc_kit/Package.swift, matching the template Flutter generates for Swift Package Manager plugins.
  • import Flutter is already present on develop, so the Swift source is unchanged.

Why

The manifest declares no dependencies, so the plugin target doesn't declare Flutter. Builds currently pass only because Xcode shares Flutter across the whole build graph. Issue #233 was closed on the assumption that SPM was already fully supported; this makes the manifest correct.

Testing

  • Built a Flutter app with flutter config --enable-swift-package-manager, no CocoaPods, using this plugin as a path dependency: flutter build ios --simulator --debug --no-codesign succeeds.
  • Launched the app on an iOS 27 simulator.
  • Not tested: NFC behavior (the simulator has no NFC hardware) and a physical device.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated the iOS package’s framework integration to use the locally available Flutter framework.
    • This is an internal packaging change; no changes to app functionality or user-facing behavior are indicated. No new features, interface changes, or fixes to user-visible issues are included in this update.

Match the Flutter plugin template so SwiftPM resolves Flutter for the
plugin target instead of relying on Xcode's shared build graph.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Swift package now declares a local FlutterFramework dependency and links its product to the flutter_nfc_kit target.

Changes: Package Dependency

Layer / File(s) Summary
Declare and link FlutterFramework
ios/flutter_nfc_kit/Package.swift
The package manifest adds the local FlutterFramework package and links its product to the flutter_nfc_kit target.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: jiegec

Merge Risk: Minimal · up to ac503

This change declares the Flutter framework dependency in the Swift package manifest so Swift Package Manager resolves Flutter explicitly for the plugin. No runtime behavior changes, and no merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change: adding a FlutterFramework dependency to the Swift package for the iOS plugin. The raw summary confirms Package.swift now depends on the local FlutterFramework package and t…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change: adding a FlutterFramework dependency to the Swift package for the iOS plugin. The raw summary confirms Package.swift now depends on the local FlutterFramework package and the flutter_nfc_kit target uses its product. The 'fix(ios)' prefix is a conventional-commit type and scope, which is acceptable. The title is specific and matches the main change.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 45f17660-305a-4f33-8d11-f62c9f86946a
Commits

Reviewing files that changed from the base of the PR and between c7079d9 and ac50304.

Files selected for processing: 1

  • ios/flutter_nfc_kit/Package.swift

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@roberthartman
roberthartman marked this pull request as ready for review November 30, 2026 15:00
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.

1 participant