Skip to content

[Bug]: Missing LICENSE file in published package causes pod install warning #413

@HeropolisDa2ny

Description

@HeropolisDa2ny

Required Reading

  • Confirmed

Plugin Version

background_fetch: ^1.5.1

Flutter Doctor

/Users/my_user/development/flutter/bin/flutter doctor --verbose
  [✓] Flutter (Channel stable, 3.41.6, on macOS 26.3.1 25D771280a darwin-arm64, locale en-US) [471ms]
  • Flutter version 3.41.6 on channel stable at /Users/my_user/development/flutter
  • Upstream repository https://github.com/flutter/flutter.git
  • Framework revision db50e20168 (2 weeks ago), 2026-03-25 16:21:00 -0700
  • Engine revision 425cfb54d0
  • Dart version 3.11.4
  • DevTools version 2.54.2
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration
  
  [✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [1,719ms]
  • Android SDK at /Users/my_user/Library/Android/sdk
  • Emulator version 36.1.9.0 (build_id 13823996) (CL:N/A)
  • Platform android-36, build-tools 36.1.0
  • ANDROID_HOME = /Users/my_user/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
  This is the JDK bundled with the latest Android Studio installation on this machine.
  To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
  • Java version OpenJDK Runtime Environment (build 21.0.6+-13391695-b895.109)
  • All Android licenses accepted.
  
  [✓] Xcode - develop for iOS and macOS (Xcode 26.2) [1,799ms]
  • Xcode at /Applications/Xcode.app/Contents/Developer
  • Build 17C52
  • CocoaPods version 1.16.2
  
  [✓] Chrome - develop for the web [4ms]
  • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
  
  [✓] Connected device (4 available) [6.2s]
  • macOS (desktop)       • macos                     • darwin-arm64   • macOS 26.3.1 25D771280a darwin-arm64
  • Chrome (web)          • chrome                    • web-javascript • Google Chrome 146.0.7680.178
  
  [✓] Network resources [193ms]
  • All expected network resources are available.
  
  • No issues found!
  Process finished with exit code 0

Mobile operating-system(s)

  • iOS
  • Android

Device Manufacturer(s) and Model(s)

Iphone 15 Plus

Device operating-systems(s)

iOS 18.7.3

What happened?

Description

Running pod install produces the following warning on every install:
[!] Unable to read the license file LICENSE for the spec TSBackgroundFetch (4.0.5)

The install itself completes successfully and the app builds/runs without issue,
but the warning appears on every pod install and pollutes local and CI logs.

Root cause

The ios/background_fetch.podspec references the LICENSE file at the package root:

s.license = { :file => '../LICENSE' }

However, the LICENSE file is not included in the package published on pub.dev,
even though it exists on the master branch of this repository
(https://github.com/transistorsoft/flutter_background_fetch/blob/master/LICENSE).

Suggested fix

Ensure the LICENSE file is included when publishing the package to pub.dev.
This likely requires updating .pubignore (or removing an overly strict files:
entry) so that the root LICENSE is shipped with the published artifact.

Alternatively, the podspec could reference a LICENSE file that is guaranteed
to be inside the ios/ directory, so it's always shipped with the iOS assets.

Plugin Code and/or Config

## Steps to reproduce

1. `flutter create test_app`
2. Add `background_fetch: ^1.5.1` to `pubspec.yaml`
3. `flutter pub get`
4. `ls ~/.pub-cache/hosted/pub.dev/background_fetch-*/`
   → no `LICENSE` file at the package root
5. `cd ios && pod install`
   → warning appears

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions