flutter/packages/flutter_tools/test/general.shard/ios
Victoria Ashworth 6d19fa3bfa
Add Swift Package Manager as new opt-in feature for iOS and macOS (#146256)
This PR adds initial support for Swift Package Manager (SPM). Users must opt in. Only compatible with Xcode 15+.

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

## Included Features

This PR includes the following features:
* Enabling SPM via config 
`flutter config --enable-swift-package-manager`
* Disabling SPM via config (will disable for all projects) 
`flutter config --no-enable-swift-package-manager`
* Disabling SPM via pubspec.yaml (will disable for the specific project)
```
flutter:
  disable-swift-package-manager: true
```
* Migrating existing apps to add SPM integration if using a Flutter plugin with a Package.swift
  * Generates a Swift Package (named `FlutterGeneratedPluginSwiftPackage`) that handles Flutter SPM-compatible plugin dependencies. Generated package is added to the Xcode project.
* Error parsing of common errors that may occur due to using CocoaPods and Swift Package Manager together
* Tool will print warnings when using all Swift Package plugins and encourage you to remove CocoaPods

This PR also converts `integration_test` and `integration_test_macos` plugins to be both Swift Packages and CocoaPod Pods.

## How it Works
The Flutter CLI will generate a Swift Package called `FlutterGeneratedPluginSwiftPackage`, which will have local dependencies on all Swift Package compatible Flutter plugins.  

The `FlutterGeneratedPluginSwiftPackage` package will be added to the Xcode project via altering of the `project.pbxproj`. 

In addition, a "Pre-action" script will be added via altering of the `Runner.xcscheme`. This script will invoke the flutter tool to copy the Flutter/FlutterMacOS framework to the `BUILT_PRODUCTS_DIR` directory before the build starts. This is needed because plugins need to be linked to the Flutter framework and fortunately Swift Package Manager automatically uses `BUILT_PRODUCTS_DIR` as a framework search path.

CocoaPods will continue to run and be used to support non-Swift Package compatible Flutter plugins.

## Not Included Features

It does not include the following (will be added in future PRs):
* Create plugin template
* Create app template
* Add-to-App integration
2024-04-18 21:12:36 +00:00
..
code_signing_test.dart [flutter_tool] change print when selecting developer identity for code signing (#136978) 2023-10-30 19:03:18 +00:00
core_devices_test.dart [flutter_tools] add debugging to ios/core_devices.dart (#142187) 2024-01-31 15:36:15 -08:00
devices_test.dart Fixed race condition in PollingDeviceDiscovery. (#145506) 2024-03-21 22:37:08 +00:00
ios_deploy_test.dart [flutter_tools] catch SocketException writing to ios-deploy stdin (#139784) 2023-12-12 00:32:18 +00:00
ios_device_install_test.dart Print warning and exit when iOS device is unpaired (#144551) 2024-03-04 23:01:11 +00:00
ios_device_logger_test.dart [flutter_tools] catch SocketException writing to ios-deploy stdin (#139784) 2023-12-12 00:32:18 +00:00
ios_device_port_forwarder_test.dart [tool] Consistent FakeProcessManager.run/runSync (#103947) 2022-05-17 11:15:54 -07:00
ios_device_project_test.dart Print warning and exit when iOS device is unpaired (#144551) 2024-03-04 23:01:11 +00:00
ios_device_start_nonprebuilt_test.dart Print warning and exit when iOS device is unpaired (#144551) 2024-03-04 23:01:11 +00:00
ios_device_start_prebuilt_test.dart Print warning and exit when iOS device is unpaired (#144551) 2024-03-04 23:01:11 +00:00
ios_project_migration_test.dart [iOS] Migrate @UIApplicationMain attribute to @main (#146707) 2024-04-16 22:13:03 +00:00
ios_workflow_test.dart Only show iOS simulators, reduce output spew in verbose (#108345) 2022-07-26 19:08:06 +00:00
mac_test.dart Add Swift Package Manager as new opt-in feature for iOS and macOS (#146256) 2024-04-18 21:12:36 +00:00
simulators_test.dart Remove dead compareIosVersions function (#146298) 2024-04-04 21:19:46 +00:00
xcode_debug_test.dart chore: fix some comments (#145397) 2024-03-19 17:00:24 +00:00
xcodeproj_test.dart Clean up lint ignores (#144229) 2024-02-27 23:21:03 +00:00
xcresult_test_data.dart Reland "Print pretty error when xcodebuild fails due to missing simulator #130286" (#130506) 2023-07-13 19:36:10 +00:00
xcresult_test.dart provide command to FakeCommand::onRun (#142206) 2024-01-25 07:51:25 +00:00