Skip to content

feat(ios): add CocoaPods podspec alongside SwiftPM for dual package manager support - #111

Open
sebasbad wants to merge 1 commit into
netdur:mainfrom
sebasbad:feat/cocoapods-swiftpm-dual-support
Open

feat(ios): add CocoaPods podspec alongside SwiftPM for dual package manager support#111
sebasbad wants to merge 1 commit into
netdur:mainfrom
sebasbad:feat/cocoapods-swiftpm-dual-support

Conversation

@sebasbad

@sebasbad sebasbad commented Aug 2, 2026

Copy link
Copy Markdown

Summary

Restores CocoaPods compatibility (llama_cpp_dart.podspec) alongside the newly added SwiftPM manifest (Package.swift).

Why Dual Support is Necessary

With v0.9.0-dev.12 introducing a SwiftPM manifest (Package.swift) while dropping .podspec, downstream Flutter iOS apps are forced into SwiftPM plugin resolution.

However, many existing Flutter apps cannot fully migrate to SwiftPM because they depend on popular third-party plugins (such as google_mobile_ads) that currently support CocoaPods only and do not ship SwiftPM manifests. In these apps, Flutter's iOS build toolchain fails due to mixed package-manager collisions.

Providing dual support (llama_cpp_dart.podspec + Package.swift) enables:

  1. Legacy / Mixed Apps: Apps using CocoaPods dependencies resolve llama_cpp_dart via CocoaPods.
  2. SwiftPM Apps: Modern SwiftPM-only Flutter setups continue resolving via SwiftPM.

Changes

  • llama_cpp_dart.podspec: Added CocoaPods specification that vendors the prebuilt Apple llama-xcframework.zip release asset.
  • pubspec.yaml: Set podspecPath: llama_cpp_dart.podspec under ios and macos platform declarations.

Supersedes

Supersedes #110.

…anager support

Restores CocoaPods compatibility (llama_cpp_dart.podspec) alongside the newly added SwiftPM manifest (Package.swift) for Flutter iOS apps with CocoaPods-only dependencies (e.g. google_mobile_ads).

Key Changes:
- Added llama_cpp_dart.podspec, ios/llama_cpp_dart.podspec, and darwin/llama_cpp_dart.podspec vendoring llama-xcframework.zip.
- Updated pubspec.yaml with podspecPath: llama_cpp_dart.podspec under iOS/macOS platform declarations.
- Bundled native/android/llama-cpp-dart.aar in repository for git dependency compatibility.
- Fixed iOS dynamic framework symbol lookup (LlamaLibrary.loadFromProcess) to support case-sensitive physical device APFS paths (Llama.framework/Llama).
@sebasbad
sebasbad force-pushed the feat/cocoapods-swiftpm-dual-support branch from c598bf9 to 659f80c Compare August 2, 2026 20:11
@sebasbad
sebasbad marked this pull request as ready for review August 2, 2026 20:11
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