Skip to content

Remove CocoaPods support, require Swift Package Manager for iOS - #3

Closed
redaranj wants to merge 1 commit into
mainfrom
fix/remove-cocoapods-support
Closed

redaranj wants to merge 1 commit into
mainfrom
fix/remove-cocoapods-support

Conversation

@redaranj

@redaranj redaranj commented Mar 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Removes CocoaPods as a viable build path for iOS. The podspec previously referenced the plugin source files, which caused builds to fail with "Unable to find module dependency: C2PA" because the C2PA module was never declared as a CocoaPods dependency.
  • The podspec now points to a stub file that emits a clear compile-time error directing users to enable SPM.
  • iOS builds continue to work via Swift Package Manager through ios/c2pa_flutter/Package.swift, which correctly declares the c2pa-ios dependency.

Changes

  • ios/c2pa_flutter.podspec: Replaced source_files pointing at real plugin sources with a reference to cocoapods_stub/. Removed pod_target_xcconfig. Fixed homepage URL.
  • ios/cocoapods_stub/C2paPlugin.swift (new): Swift #error directive that produces a clear message when someone attempts a CocoaPods-based build.

Test plan

  • flutter pub get succeeds in the example app
  • flutter build ios --no-codesign succeeds (SPM path)
  • Verify CocoaPods path produces the expected #error message (requires a project without SPM enabled)

Generated with Claude Code

@redaranj redaranj closed this Apr 13, 2026
redaranj added a commit that referenced this pull request Nov 26, 2026
* Update to latest c2pa/android sdks, implement their new features

* Update style for consistency

* Update licenses

* More style cleanup

* Formatting fixes

* Fix swift directive

* Fix iOS build errors, update changelog
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