Skip to content

feat: Add Swift Package Manager support and migrate Android to Kotlin - #10

Open
thorito wants to merge 9 commits into
Alberto-Monteiro:masterfrom
thorito:feat/add-spm-support
Open

feat: Add Swift Package Manager support and migrate Android to Kotlin#10
thorito wants to merge 9 commits into
Alberto-Monteiro:masterfrom
thorito:feat/add-spm-support

Conversation

@thorito

@thorito thorito commented May 19, 2026

Copy link
Copy Markdown

Summary

  • Add full Swift Package Manager (SPM) support for iOS, replacing CocoaPods dependency
  • Migrate Android plugin from Java to Kotlin with improved error handling
  • Update build configurations to modern versions (Gradle 8.14, AGP 8.11.1, Java 11)
  • Fix nullable thumbnail file return type handling

Changes

iOS

  • Restructured iOS code to ios/get_thumbnail_video/ for SPM compatibility
  • Updated Package.swift with FlutterFramework dependency
  • Removed CocoaPods integration from example app
  • Added camera, photo library, and microphone usage descriptions

Android

  • Converted VideoThumbnailPlugin from Java to Kotlin
  • Migrated to built-in Kotlin (removed KGP dependency)
  • Improved frame extraction with multiple fallback options for large/unsupported videos
  • Updated compile SDK to 35 and Java compatibility to 11

Dart

  • Changed thumbnailFile return type to XFile? to handle null cases
  • Added null safety checks in example app
  • Updated tests for nullable return type

Breaking Changes

  • iOS projects must use Swift Package Manager instead of CocoaPods
  • Android requires Gradle 8.14+ and AGP 8.11.1+

thorito added 9 commits May 19, 2026 12:25
- Add Package.swift for SPM support
- Update libwebp imports to support both CocoaPods and SPM
- Enable privacy manifest bundle in podspec
- Maintain full backward compatibility with CocoaPods
- Fix Android WEBP_LOSSLESS crash on API < 30 (add version check)
- Remove unused variable in test file
- Fix dangling library doc comment
- Fix missing import for visibleForTesting annotation
- Remove unused cupertino.dart import
- Update pubspec.yaml: remove empty homepage, add issue_tracker and topics
- Update podspec metadata: version, homepage, author
- Remove deprecated package attribute from AndroidManifest.xml
- Migrate video_thumbnail_web.dart from deprecated dart:html to package:web
- Update example app to use super.key instead of Key? key
- Replace deprecated Radio.groupValue/onChanged with RadioGroup
- Add const constructors where recommended
- Convert VideoThumbnailPlugin to Kotlin
- Update build.gradle to use built-in Kotlin and Java 11
- Improve frame extraction with multiple fallback options
- Add better error handling for large/unsupported videos
- Restructure iOS code for SPM compatibility
- Move Classes/Resources to ios/get_thumbnail_video/
- Update Package.swift with FlutterFramework dependency
- Update podspec paths for new structure
- Change thumbnailFile return type to XFile?
- Add null check in example app
- Update tests for nullable return type
- Remove Podfile and CocoaPods references from xcconfig
- Add SPM integration to Xcode project
- Add camera/photo library/mic usage descriptions
- Update AppDelegate for implicit engine delegate
- Upgrade Gradle to 8.14 and AGP to 8.11.1
- Migrate example app to built-in Kotlin
- Update dependency versions
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