Skip to content

Add Swift Package Manager support for iOS and macOS - #651

Open
shivanshu877 wants to merge 1 commit into
dlutton:masterfrom
shivanshu877:feat/swift-package-manager
Open

Add Swift Package Manager support for iOS and macOS#651
shivanshu877 wants to merge 1 commit into
dlutton:masterfrom
shivanshu877:feat/swift-package-manager

Conversation

@shivanshu877

Copy link
Copy Markdown

Migrates both Apple plugins to Swift Package Manager while keeping CocoaPods working, so apps can build flutter_tts under either build system.

Changes:

  • iOS: move the Swift sources under ios/flutter_tts/Sources/flutter_tts, remove the Objective-C registration shim (FlutterTtsPlugin.h/.m) and rename SwiftFlutterTtsPlugin to FlutterTtsPlugin, so the pubspec pluginClass is unchanged and iOS now matches the existing macOS implementation.
  • macOS: move the Swift source under macos/flutter_tts/Sources/flutter_tts.
  • Add ios/ and macos/ Package.swift (each depends on FlutterFramework).
  • Update both podspecs' source_files and drop the obsolete iOS public_header_files entry.

Testing:

  • flutter build ios --simulator and flutter build macos on the example both succeed with Swift Package Manager enabled, and still succeed with CocoaPods (SPM disabled).

Migrates both Apple plugins to Swift Package Manager while keeping CocoaPods
working:

- iOS: move the Swift sources under ios/flutter_tts/Sources/flutter_tts, remove
  the Objective-C registration shim (FlutterTtsPlugin.h/.m) and rename
  SwiftFlutterTtsPlugin to FlutterTtsPlugin so the pubspec pluginClass is
  unchanged, matching the existing macOS implementation.
- macOS: move the Swift source under macos/flutter_tts/Sources/flutter_tts.
- Add ios/ and macos/ Package.swift (each depends on FlutterFramework).
- Update both podspecs' source_files to the new locations and drop the obsolete
  iOS public_header_files entry.

Verified: example builds for the iOS simulator and macOS under both Swift
Package Manager and CocoaPods.
@SureshSelam

Copy link
Copy Markdown

The following plugins do not support Swift Package Manager for ios:

  • flutter_tts

I am also getting the same issues please accept this and release the new version

@SureshSelam SureshSelam left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes must be accept
I am getting error
The following plugins do not support Swift Package Manager for ios:

  • flutter_tts

@SureshSelam SureshSelam left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please release this commit and approve
SPM supprot required

@MauriBarbar

Copy link
Copy Markdown

Can you please merge this ?

@SureshSelam SureshSelam left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve this

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.

3 participants