Add create app and plugin templates for Swift Package Manager (#147082)

When Swift Package Manager feature is enabled, create app and create plugin will have Swift Package Manager integration already added and will not need to undergo a migration.

Fixes https://github.com/flutter/flutter/issues/146371.

```
flutter config --enable-swift-package-manager

flutter create --ios-language swift --platforms ios,macos swift_app_name

flutter create --ios-language objc --platforms ios objc_app_name

flutter create --template=plugin --ios-language swift --platforms ios,macos swift_plugin_name

flutter create --template=plugin --ios-language objc --platforms ios objc_plugin_name
```
This commit is contained in:
Victoria Ashworth
2024-04-24 17:46:20 -05:00
committed by GitHub
parent d85571b46b
commit 5a63b1df95
36 changed files with 1197 additions and 451 deletions

View File

@@ -13,8 +13,14 @@ Pod::Spec.new do |s|
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
{{#withSwiftPackageManager}}
s.source_files = '{{projectName}}/Sources/{{projectName}}/**/*'
s.public_header_files = '{{projectName}}/Sources/{{projectName}}/include/{{projectName}}/**/*.h'
{{/withSwiftPackageManager}}
{{^withSwiftPackageManager}}
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
{{/withSwiftPackageManager}}
s.dependency 'Flutter'
s.platform = :ios, '12.0'