Skip to content

fix: Standardize iOS SPM directory structure for proper Flutter tooling detection#668

Closed
seunghonice wants to merge 2 commits into
fluttercommunity:mainfrom
seunghonice:feature/standardize-spm
Closed

fix: Standardize iOS SPM directory structure for proper Flutter tooling detection#668
seunghonice wants to merge 2 commits into
fluttercommunity:mainfrom
seunghonice:feature/standardize-spm

Conversation

@seunghonice
Copy link
Copy Markdown

Summary

  • Restructure workmanager_apple/ios/ to follow the official Flutter SPM plugin layout
  • Move Package.swift from ios/Package.swift (flat) to ios/workmanager_apple/Package.swift (nested)
  • Flutter tooling expects ios/<plugin_name>/Package.swift to detect SPM support — the previous flat layout caused SPM detection to fail, falling back to CocoaPods

What changed

Item Before After
Package.swift ios/Package.swift ios/workmanager_apple/Package.swift
Swift sources ios/Sources/workmanager_apple/ ios/workmanager_apple/Sources/workmanager_apple/
PrivacyInfo ios/Resources/ ios/workmanager_apple/Sources/workmanager_apple/Resources/
SPM library name workmanager_apple workmanager-apple (hyphenated, per convention)

CocoaPods paths in workmanager_apple.podspec are updated accordingly so both SPM and CocoaPods continue to work.

Breaking Changes

None — this is a directory restructure internal to the plugin. No public API changes.

Test plan

  • flutter build ios --debug --no-codesign succeeds with the example app

ios/Package.swift → ios/workmanager_apple/Package.swift 중첩 구조로 이동하여
Flutter tooling이 SPM을 올바르게 인식하도록 수정
@docs-page
Copy link
Copy Markdown

docs-page Bot commented May 26, 2026

To view this pull requests documentation preview, visit the following URL:

docs.page/fluttercommunity/flutter_workmanager~668

Documentation is deployed and generated using docs.page.

CocoaPods에서는 모듈 전체가 하나로 컴파일되어 다른 파일의 import가 공유되지만,
SPM에서는 파일 단위로 import가 필요함
@seunghonice
Copy link
Copy Markdown
Author

Closing as duplicate of #657

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