-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Open
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listteam-iosOwned by iOS platform teamOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Description
- When detected that a flutter project is a plugin example app that has a podspec but doesn't have a Package.swift, prompt the user to add Swift Package Manager compatibility and point to documentation with instructions on how to do that.
flutter/packages/flutter_tools/lib/src/plugins.dart
Lines 392 to 418 in 708fe97
| /// Expected path to the plugin's Package.swift. Returns null if the plugin | |
| /// does not support the [platform] or the [platform] is not iOS or macOS. | |
| String? pluginSwiftPackageManifestPath( | |
| FileSystem fileSystem, | |
| String platform, | |
| ) { | |
| final String? platformDirectoryName = _darwinPluginDirectoryName(platform); | |
| if (platformDirectoryName == null) { | |
| return null; | |
| } | |
| return fileSystem.path.join( | |
| path, | |
| platformDirectoryName, | |
| name, | |
| 'Package.swift', | |
| ); | |
| } | |
| /// Expected path to the plugin's podspec. Returns null if the plugin does | |
| /// not support the [platform] or the [platform] is not iOS or macOS. | |
| String? pluginPodspecPath(FileSystem fileSystem, String platform) { | |
| final String? platformDirectoryName = _darwinPluginDirectoryName(platform); | |
| if (platformDirectoryName == null) { | |
| return null; | |
| } | |
| return fileSystem.path.join(path, platformDirectoryName, '$name.podspec'); | |
| } |
| bool get hasExampleApp => _exampleDirectory(directory).existsSync(); |
flutter/packages/flutter_tools/lib/src/project.dart
Lines 253 to 257 in 708fe97
| FlutterProject get example => FlutterProject( | |
| _exampleDirectory(directory), | |
| _exampleManifest, | |
| FlutterManifest.empty(logger: globals.logger), | |
| ); |
| bool get isPlugin => manifest.isPlugin; |
- Also, if they do have a Package.swift, validate that they have a dependency on the FlutterFramework. See https://github.com/flutter/flutter/blob/master/packages/integration_test/ios/integration_test/Package.swift as example
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listteam-iosOwned by iOS platform teamOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform teamTriaged by iOS platform team