diff --git a/sites/docs/src/_includes/docs/swift-package-manager/how-to-enable-disable.md b/sites/docs/src/_includes/docs/swift-package-manager/how-to-enable-disable.md deleted file mode 100644 index 752fbf3eb97..00000000000 --- a/sites/docs/src/_includes/docs/swift-package-manager/how-to-enable-disable.md +++ /dev/null @@ -1,85 +0,0 @@ -## How to turn on Swift Package Manager - -Flutter's Swift Package Manager support is turned off by default. -To turn it on: - -1. Upgrade to the latest Flutter SDK: - - ```sh - flutter upgrade - ``` - -1. Turn on the Swift Package Manager feature: - - ```sh - flutter config --enable-swift-package-manager - ``` - -Using the Flutter CLI to run an app [migrates the project][addSPM] to add -Swift Package Manager integration. -This makes your project download the Swift packages that -your Flutter plugins depend on. -An app with Swift Package Manager integration requires Flutter version 3.24 or -higher. -To use an older Flutter version, -you will need to [remove Swift Package Manager integration][removeSPM] -from the app. - -Flutter falls back to CocoaPods for dependencies that do not support Swift -Package Manager yet. - -## How to turn off Swift Package Manager - -:::secondary Plugin authors -Plugin authors need to turn on and off Flutter's Swift Package Manager -support for testing. -App developers do not need to disable Swift Package Manager support, -unless they are running into issues. - -If you find a bug in Flutter's Swift Package Manager support, -[open an issue][]. -::: - -Disabling Swift Package Manager causes Flutter to use CocoaPods for all -dependencies. -However, Swift Package Manager remains integrated with your project. -To remove Swift Package Manager integration completely from your project, -follow the [How to remove Swift Package Manager integration][removeSPM] -instructions. - -### Turn off for a single project - -In the project's `pubspec.yaml` file, under the `flutter` section, -set `enable-swift-package-manager` to `false` in the `config` subsection. - -```yaml title="pubspec.yaml" -# The following section is specific to Flutter packages. -flutter: - config: - enable-swift-package-manager: false -``` - -This turns off Swift Package Manager for all contributors to this project. - -:::note Migrating from deprecated syntax -If you were previously using `disable-swift-package-manager: true`, -update your `pubspec.yaml` to use the new `config` section format shown above. -The old syntax is deprecated and will produce an error in Flutter 3.38 and later. -::: - -### Turn off globally for all projects - -Run the following command: - -```sh -flutter config --no-enable-swift-package-manager -``` - -This turns off Swift Package Manager for the current user. - -If a project is incompatible with Swift Package Manager, all contributors -need to run this command. - -[addSPM]: /packages-and-plugins/swift-package-manager/for-app-developers/#how-to-add-swift-package-manager-integration -[removeSPM]: /packages-and-plugins/swift-package-manager/for-app-developers#how-to-remove-swift-package-manager-integration -[open an issue]: {{site.github}}/flutter/flutter/issues/new?template=2_bug.yml diff --git a/sites/docs/src/_includes/docs/swift-package-manager/migrate-ios-project-manually.md b/sites/docs/src/_includes/docs/swift-package-manager/migrate-ios-project-manually.md index 6ee3276b80d..fa4b058d873 100644 --- a/sites/docs/src/_includes/docs/swift-package-manager/migrate-ios-project-manually.md +++ b/sites/docs/src/_includes/docs/swift-package-manager/migrate-ios-project-manually.md @@ -1,25 +1,10 @@ -Once you [turn on Swift Package Manager][], the Flutter CLI tries to migrate -your project to use Swift Package Manager the next time you run your app -using the CLI. +Migrating to SwiftPM requires updating the +`ios/Runner.xcodeproj/project.pbxproj` and +`ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme` files. -However, the Flutter CLI tool might be unable to migrate your project -automatically if there are unexpected modifications. +### Step 1: Add FlutterGeneratedPluginSwiftPackage package dependency {:.no_toc} -If the automatic migration fails, use the steps below to add Swift Package -Manager integration to a project manually. - -Before migrating manually, [file an issue][]; this helps the Flutter team -improve the automatic migration process. -Include the error message and, if possible, include a copy of -the following files in your issue: - -* `ios/Runner.xcodeproj/project.pbxproj` -* `ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme` - (or the xcsheme for the flavor used) - -### Step 1: Add FlutterGeneratedPluginSwiftPackage Package Dependency {:.no_toc} - -1. Open your app (`ios/Runner.xcworkspace`) in Xcode. +1. In Xcode, open `ios/Runner.xcworkspace`. 1. Navigate to **Package Dependencies** for the project. @@ -37,12 +22,12 @@ the following files in your issue: -### Step 2: Add Run Prepare Flutter Framework Script Pre-Action {:.no_toc} +### Step 2: Add Run Prepare Flutter Framework Script Pre-action {:.no_toc} **The following steps must be completed for each flavor.** 1. Go to **Product > Scheme > Edit Scheme**. -1. Expand the **Build** section in the left side bar. +1. Expand the **Build** section in the left sidebar. 1. Click **Pre-actions**. 1. Click the button and select **New Run Script Action** from the menu. @@ -63,7 +48,7 @@ the following files in your issue: ### Step 3: Run app {:.no_toc} -1. Run the app in Xcode. +1. In Xcode, run the app. 1. Ensure that **Run Prepare Flutter Framework Script** runs as a pre-action and that `FlutterGeneratedPluginSwiftPackage` is a target dependency. diff --git a/sites/docs/src/_includes/docs/swift-package-manager/migrate-ios-project.md b/sites/docs/src/_includes/docs/swift-package-manager/migrate-ios-project.md deleted file mode 100644 index a038c54dfdc..00000000000 --- a/sites/docs/src/_includes/docs/swift-package-manager/migrate-ios-project.md +++ /dev/null @@ -1,36 +0,0 @@ -Once you [turn on Swift Package Manager][], the Flutter CLI tries to migrate -your project the next time you run your app using the CLI. -This migration updates your Xcode project to use Swift Package Manager to -add Flutter plugin dependencies. - -To migrate your project: - -1. [Turn on Swift Package Manager][]. - -1. Run the iOS app using the Flutter CLI. - - If your iOS project doesn't have Swift Package Manager integration yet, the - Flutter CLI tries to migrate your project and outputs something like: - - ```console - $ flutter run - Adding Swift Package Manager integration... - ``` - - The automatic iOS migration modifies the - `ios/Runner.xcodeproj/project.pbxproj` and - `ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme` files. - -1. If the Flutter CLI's automatic migration fails, follow the steps in - [add Swift Package Manager integration manually][manualIntegration]. - -[Optional] To check if your project is migrated: - -1. Run the app in Xcode. -1. Ensure that **Run Prepare Flutter Framework Script** runs as a pre-action - and that `FlutterGeneratedPluginSwiftPackage` is a target dependency. - - - -[Turn on Swift Package Manager]: /packages-and-plugins/swift-package-manager/for-app-developers/#how-to-turn-on-swift-package-manager -[manualIntegration]: /packages-and-plugins/swift-package-manager/for-app-developers/#add-to-a-flutter-app-manually diff --git a/sites/docs/src/_includes/docs/swift-package-manager/migrate-macos-project-manually.md b/sites/docs/src/_includes/docs/swift-package-manager/migrate-macos-project-manually.md index 8b0e623dfae..faf10542584 100644 --- a/sites/docs/src/_includes/docs/swift-package-manager/migrate-macos-project-manually.md +++ b/sites/docs/src/_includes/docs/swift-package-manager/migrate-macos-project-manually.md @@ -1,25 +1,10 @@ -Once you [turn on Swift Package Manager][], the Flutter CLI tries to migrate -your project to use Swift Package Manager the next time you run your app -using the CLI. +Migrating to SwiftPM requires updating the +`macos/Runner.xcodeproj/project.pbxproj` and +`macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme` files. -However, the Flutter CLI tool might be unable to migrate your project -automatically if there are unexpected modifications. +### Step 1: Add FlutterGeneratedPluginSwiftPackage package dependency {:.no_toc} -If the automatic migration fails, use the steps below to add Swift Package -Manager integration to a project manually. - -Before migrating manually, [file an issue][]; this helps the Flutter team -improve the automatic migration process. -Include the error message and, if possible, include a copy of -the following files in your issue: - -* `macos/Runner.xcodeproj/project.pbxproj` -* `macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme` - (or the xcscheme for the flavor used) - -### Step 1: Add FlutterGeneratedPluginSwiftPackage Package Dependency {:.no_toc} - -1. Open your app (`macos/Runner.xcworkspace`) in Xcode. +1. In Xcode, open `macos/Runner.xcworkspace`. 1. Navigate to **Package Dependencies** for the project. @@ -37,12 +22,12 @@ the following files in your issue: -### Step 2: Add Run Prepare Flutter Framework Script Pre-Action {:.no_toc} +### Step 2: Add Run Prepare Flutter Framework Script Pre-action {:.no_toc} **The following steps must be completed for each flavor.** 1. Go to **Product > Scheme > Edit Scheme**. -1. Expand the **Build** section in the left side bar. +1. Expand the **Build** section in the left sidebar. 1. Click **Pre-actions**. 1. Click the button and select **New Run Script Action** from the menu. @@ -63,7 +48,7 @@ the following files in your issue: ### Step 3: Run app {:.no_toc} -1. Run the app in Xcode. +1. In Xcode, run the app. 1. Ensure that **Run Prepare Flutter Framework Script** runs as a pre-action and that `FlutterGeneratedPluginSwiftPackage` is a target dependency. @@ -71,5 +56,4 @@ the following files in your issue: 1. Ensure that the app runs on the command line with `flutter run`. -[turn on Swift Package Manager]: /packages-and-plugins/swift-package-manager/for-app-developers/#how-to-turn-on-swift-package-manager [file an issue]: {{site.github}}/flutter/flutter/issues/new?template=2_bug.yml diff --git a/sites/docs/src/_includes/docs/swift-package-manager/migrate-macos-project.md b/sites/docs/src/_includes/docs/swift-package-manager/migrate-macos-project.md deleted file mode 100644 index 6aeeb1c9a63..00000000000 --- a/sites/docs/src/_includes/docs/swift-package-manager/migrate-macos-project.md +++ /dev/null @@ -1,36 +0,0 @@ -Once you [turn on Swift Package Manager][], the Flutter CLI tries to migrate -your project the next time you run your app using the CLI. -This migration updates your Xcode project to use Swift Package Manager to -add Flutter plugin dependencies. - -To migrate your project: - -1. [Turn on Swift Package Manager][]. - -1. Run the macOS app using the Flutter CLI. - - If your macOS project doesn't have Swift Package Manager integration yet, the - Flutter CLI tries to migrate your project and outputs something like: - - ```console - $ flutter run -d macos - Adding Swift Package Manager integration... - ``` - - The automatic iOS migration modifies the - `macos/Runner.xcodeproj/project.pbxproj` and - `macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme` files. - -1. If the Flutter CLI's automatic migration fails, follow the steps in - [add Swift Package Manager integration manually][manualIntegration]. - -[Optional] To check if your project is migrated: - -1. Run the app in Xcode. -1. Ensure that **Run Prepare Flutter Framework Script** runs as a pre-action - and that `FlutterGeneratedPluginSwiftPackage` is a target dependency. - - - -[Turn on Swift Package Manager]: /packages-and-plugins/swift-package-manager/for-app-developers/#how-to-turn-on-swift-package-manager -[manualIntegration]: /packages-and-plugins/swift-package-manager/for-app-developers/#add-to-a-flutter-app-manually diff --git a/sites/docs/src/_includes/docs/swift-package-manager/migrate-objective-c-plugin.md b/sites/docs/src/_includes/docs/swift-package-manager/migrate-objective-c-plugin.md index 6636474b8a5..1fa6c1d2414 100644 --- a/sites/docs/src/_includes/docs/swift-package-manager/migrate-objective-c-plugin.md +++ b/sites/docs/src/_includes/docs/swift-package-manager/migrate-objective-c-plugin.md @@ -1,7 +1,7 @@ Replace `plugin_name` throughout this guide with the name of your plugin. -The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. +The example below uses `ios`, replace `ios` with `macos` or `darwin`, as applicable. -1. [Turn on the Swift Package Manager feature][enableSPM]. +1. Ensure that you are running Flutter 3.44 or later. This enables SwiftPM by default. 1. Start by creating a directory under the `ios`, `macos`, and/or `darwin` directories. @@ -73,9 +73,10 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. dependencies: [], resources: [ // TODO: If your plugin requires a privacy manifest - // (e.g. if it uses any required reason APIs), update the PrivacyInfo.xcprivacy file + // (in other words, if it uses any required reason APIs), + // update the PrivacyInfo.xcprivacy file // to describe your plugin's privacy impact, and then uncomment this line. - // For more information, see: + // For more information, visit: // https://developer.apple.com/documentation/bundleresources/privacy_manifest_files // .process("PrivacyInfo.xcprivacy"), @@ -104,7 +105,7 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. ], ``` - [supported platforms]: https://developer.apple.com/documentation/packagedescription/supportedplatform + [supported platforms]: {{site.apple-dev}}/documentation/packagedescription/supportedplatform 1. Update the package, library, and target names in your `Package.swift` file. @@ -129,9 +130,10 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. dependencies: [], resources: [ // TODO: If your plugin requires a privacy manifest - // (e.g. if it uses any required reason APIs), update the PrivacyInfo.xcprivacy file + // (for example, if it uses any required reason APIs), + // update the PrivacyInfo.xcprivacy file // to describe your plugin's privacy impact, and then uncomment this line. - // For more information, see: + // For more information, visit: // https://developer.apple.com/documentation/bundleresources/privacy_manifest_files // .process("PrivacyInfo.xcprivacy"), @@ -160,9 +162,10 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. ```swift title="Package.swift" resources: [ // TODO: If your plugin requires a privacy manifest - // (e.g. if it uses any required reason APIs), update the PrivacyInfo.xcprivacy file + // (for example, if it uses any required reason APIs), + // update the PrivacyInfo.xcprivacy file // to describe your plugin's privacy impact, and then uncomment this line. - // For more information, see: + // For more information, visit: // https://developer.apple.com/documentation/bundleresources/privacy_manifest_files [!.process("PrivacyInfo.xcprivacy"),!] @@ -175,8 +178,8 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. 1. Move any resource files from `ios/Assets` to `ios/plugin_name/Sources/plugin_name` (or a subdirectory). Add the resource files to your `Package.swift` file, if applicable. - For more instructions, see - [https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package](https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package). + For more instructions, visit + [https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package]({{site.apple-dev}}/documentation/xcode/bundling-resources-with-a-swift-package). 1. Move any public headers from `ios/Classes` to `ios/plugin_name/Sources/plugin_name/include/plugin_name`. @@ -292,10 +295,10 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. 1. Update your `Package.swift` file with any customizations you might need. - 1. Open the `ios/plugin_name/` directory in Xcode. + 1. In Xcode, open the `ios/plugin_name/` directory. 1. In Xcode, open your `Package.swift` file. - Verify Xcode doesn't produce any warnings or errors for this file. + Verify that Xcode doesn't produce any warnings or errors for this file. :::tip If Xcode doesn't show any files, quit Xcode (**Xcode > Quit Xcode**) and @@ -320,7 +323,7 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. ``` 1. Make any other customizations. For more information on how to write a - `Package.swift` file, see + `Package.swift` file, visit [https://developer.apple.com/documentation/packagedescription](https://developer.apple.com/documentation/packagedescription). :::tip @@ -360,8 +363,8 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. ::: 1. If your `ios/plugin_name/Sources/plugin_name/include` directory only - contains a `.gitkeep`, you'll want update your `.gitignore` to include the - following: + contains a `.gitkeep`, you'll want to update your `.gitignore` to + include the following: ```text title=".gitignore" !.gitkeep @@ -442,7 +445,7 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. [undo the Swift Package Manager migration][removeSPM]. ::: - 1. Open the plugin's example app in Xcode. + 1. In Xcode, open the plugin's example app. Ensure that **Package Dependencies** shows in the left **Project Navigator**. @@ -453,7 +456,6 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. * Follow instructions for [testing plugins][]. -[enableSPM]: /packages-and-plugins/swift-package-manager/for-plugin-authors#how-to-turn-on-swift-package-manager [`PrivacyInfo.xcprivacy` file]: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files [`public_header_files`]: https://guides.cocoapods.org/syntax/podspec.html#public_header_files [Swift Package Manager's documentation]: {{site.github}}/apple/swift-package-manager/blob/main/Documentation/Usage.md#creating-c-language-targets diff --git a/sites/docs/src/_includes/docs/swift-package-manager/migrate-swift-plugin.md b/sites/docs/src/_includes/docs/swift-package-manager/migrate-swift-plugin.md index d0f5dc223ca..6ee21ba1a2c 100644 --- a/sites/docs/src/_includes/docs/swift-package-manager/migrate-swift-plugin.md +++ b/sites/docs/src/_includes/docs/swift-package-manager/migrate-swift-plugin.md @@ -1,7 +1,7 @@ Replace `plugin_name` throughout this guide with the name of your plugin. -The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. +The example below uses `ios`, replace `ios` with `macos` or `darwin`, as applicable. -1. [Turn on the Swift Package Manager feature][enableSPM]. +1. Ensure that you are using Flutter 3.44 or later. This enables SwiftPM by default. 1. Start by creating a directory under the `ios`, `macos`, and/or `darwin` directories. @@ -73,7 +73,7 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. // TODO: If your plugin requires a privacy manifest // (e.g. if it uses any required reason APIs), update the PrivacyInfo.xcprivacy file // to describe your plugin's privacy impact, and then uncomment this line. - // For more information, see: + // For more information, visit: // https://developer.apple.com/documentation/bundleresources/privacy_manifest_files // .process("PrivacyInfo.xcprivacy"), @@ -98,7 +98,7 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. ], ``` - [supported platforms]: https://developer.apple.com/documentation/packagedescription/supportedplatform + [supported platforms]: {{site.apple-dev}}/documentation/packagedescription/supportedplatform 1. Update the package, library, and target names in your `Package.swift` file. @@ -125,7 +125,7 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. // TODO: If your plugin requires a privacy manifest // (e.g. if it uses any required reason APIs), update the PrivacyInfo.xcprivacy file // to describe your plugin's privacy impact, and then uncomment this line. - // For more information, see: + // For more information, visit: // https://developer.apple.com/documentation/bundleresources/privacy_manifest_files // .process("PrivacyInfo.xcprivacy"), @@ -152,7 +152,7 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. // TODO: If your plugin requires a privacy manifest // (e.g. if it uses any required reason APIs), update the PrivacyInfo.xcprivacy file // to describe your plugin's privacy impact, and then uncomment this line. - // For more information, see: + // For more information, visit: // https://developer.apple.com/documentation/bundleresources/privacy_manifest_files [!.process("PrivacyInfo.xcprivacy"),!] @@ -165,12 +165,14 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. 1. Move any resource files from `ios/Assets` to `ios/plugin_name/Sources/plugin_name` (or a subdirectory). Add the resource files to your `Package.swift` file, if applicable. - For more instructions, see - [https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package](https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package). + For more instructions, visit + [Bundling resources with a Swift package][]. + +[Bundling resources with a Swift package]: {{site.apple-dev}}/documentation/xcode/bundling-resources-with-a-swift-package 1. Move all files from `ios/Classes` to `ios/plugin_name/Sources/plugin_name`. -1. **New in Flutter 3.41!** Add the FlutterFramework as a dependency and update Dart/Flutter version. +1. Add the `FlutterFramework` as a dependency and update Dart and Flutter versions. Update `Package.swift` to include `FlutterFramework`: @@ -211,7 +213,7 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. 1. Update your `Package.swift` file with any customizations you might need. - 1. Open the `ios/plugin_name/` directory in Xcode. + 1. In Xcode, open the `ios/plugin_name/` directory. 1. In Xcode, open your `Package.swift` file. Verify Xcode doesn't produce any warnings or errors for this file. @@ -239,14 +241,15 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. ``` 1. Make any other customizations. For more information on how to write a - `Package.swift` file, see - [https://developer.apple.com/documentation/packagedescription](https://developer.apple.com/documentation/packagedescription). + `Package.swift` file, visit [`PackageDescription`][]. :::tip If you add targets to your `Package.swift` file, use unique names. This avoids conflicts with targets from other packages. ::: +[`PackageDescription`]: {{site.apple-dev}}/documentation/packagedescription + 1. Update your `ios/plugin_name.podspec` to point to new paths. ```ruby title="ios/plugin_name.podspec" diff @@ -353,7 +356,7 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. [undo the Swift Package Manager migration][removeSPM]. ::: - 1. Open the plugin's example app in Xcode. + 1. In Xcode, open the plugin's example app. Ensure that **Package Dependencies** shows in the left **Project Navigator**. @@ -364,16 +367,15 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable. * Follow instructions for [testing plugins][]. -[enableSPM]: /packages-and-plugins/swift-package-manager/for-plugin-authors#how-to-turn-on-swift-package-manager -[`PrivacyInfo.xcprivacy` file]: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files +[`PrivacyInfo.xcprivacy` file]: {{site.apple-dev}}/documentation/bundleresources/privacy_manifest_files [Pigeon]: https://pub.dev/packages/pigeon [CocoaPods `dependency`]: https://guides.cocoapods.org/syntax/podspec.html#dependency -[Swift Package Manager dependencies]: https://developer.apple.com/documentation/packagedescription/package/dependency -[not recommended by Apple]: https://developer.apple.com/documentation/packagedescription/product/library(name:type:targets:) -[Product]: https://developer.apple.com/documentation/packagedescription/product -[`Bundle.module`]: https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package#Access-a-resource-in-code -[Bundling resources]: https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package#Explicitly-declare-or-exclude-resources -[Xcode resource detection]: https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package#:~:text=Xcode%20detects%20common%20resource%20types%20for%20Apple%20platforms%20and%20treats%20them%20as%20a%20resource%20automatically +[Swift Package Manager dependencies]: {{site.apple-dev}}/documentation/packagedescription/package/dependency +[not recommended by Apple]: {{site.apple-dev}}/documentation/packagedescription/product/library(name:type:targets:) +[Product]: {{site.apple-dev}}/documentation/packagedescription/product +[`Bundle.module`]: {{site.apple-dev}}/documentation/xcode/bundling-resources-with-a-swift-package#Access-a-resource-in-code +[Bundling resources]: {{site.apple-dev}}/documentation/xcode/bundling-resources-with-a-swift-package#Explicitly-declare-or-exclude-resources +[Xcode resource detection]: {{site.apple-dev}}/documentation/xcode/bundling-resources-with-a-swift-package#:~:text=Xcode%20detects%20common%20resource%20types%20for%20Apple%20platforms%20and%20treats%20them%20as%20a%20resource%20automatically [removeSPM]: /packages-and-plugins/swift-package-manager/for-app-developers#how-to-remove-swift-package-manager-integration [update unit tests in the plugin's example app]: /packages-and-plugins/swift-package-manager/for-plugin-authors/#how-to-update-unit-tests-in-a-plugins-example-app -[testing plugins]: https://docs.flutter.dev/testing/testing-plugins +[testing plugins]: /testing/testing-plugins diff --git a/sites/docs/src/content/add-to-app/ios/project-setup-legacy.md b/sites/docs/src/content/add-to-app/ios/project-setup-legacy.md index d25ec14b642..c18e52598ec 100644 --- a/sites/docs/src/content/add-to-app/ios/project-setup-legacy.md +++ b/sites/docs/src/content/add-to-app/ios/project-setup-legacy.md @@ -9,7 +9,7 @@ description: Learn how to integrate a Flutter module into your existing iOS proj As of Flutter 3.44, Swift Package Manager (SwiftPM) replaces CocoaPods as the default dependency manager for iOS and macOS Flutter apps. CocoaPods is officially in maintenance mode, -and its registry will permanently [become read-only on December 2, 2026][]. +and its registry will permanently [become read-only on December 2, 2026][read-only]. This guide is preserved for reference only, and will not receive ongoing maintenance. Please migrate to using Swift Package Manager using the [updated integration guide][]. @@ -204,8 +204,8 @@ You can now [add a Flutter screen][] to your existing iOS app. [CocoaPods]: https://cocoapods.org/ [app-size]: /resources/faq#how-big-is-the-flutter-engine [VS Code]: /tools/vs-code -[News Feed app]: https://github.com/flutter/put-flutter-to-work/tree/022208184ec2623af2d113d13d90e8e1ce722365 +[News Feed app]: {{site.github}}/flutter/put-flutter-to-work/tree/022208184ec2623af2d113d13d90e8e1ce722365 [Debugging your add-to-app module]: /add-to-app/debugging/ [apple-silicon]: https://support.apple.com/en-us/116943 -[become read-only on December 2, 2026]: https://blog.cocoapods.org/CocoaPods-Specs-Repo/ -[updated integration guide]: /add-to-app/ios/project-setup \ No newline at end of file +[read-only]: https://blog.cocoapods.org/CocoaPods-Specs-Repo/ +[updated integration guide]: /add-to-app/ios/project-setup diff --git a/sites/docs/src/content/add-to-app/ios/project-setup.md b/sites/docs/src/content/add-to-app/ios/project-setup.md index 55f6666ee45..671366c1284 100644 --- a/sites/docs/src/content/add-to-app/ios/project-setup.md +++ b/sites/docs/src/content/add-to-app/ios/project-setup.md @@ -4,19 +4,17 @@ shortTitle: Integrate Flutter description: Learn how to integrate a Flutter app into your existing iOS project. --- -:::tip New! This guide has been updated to use Swift Package Manager - -As of Flutter 3.44, Swift Package Manager replaces CocoaPods -as the default dependency manager for iOS and macOS Flutter apps. -CocoaPods is officially in maintenance mode, -and its registry will permanently [become read-only on December 2, 2026][]. - -The [legacy integration guide][] is preserved for reference, -but will not receive ongoing maintenance. -Please migrate to using Swift Package Manager. - +:::note +As of the 3.44 release, Flutter uses [Swift Package Manager][] +to manage iOS and macOS native dependencies. +Flutter continues to support CocoaPods in maintenance mode, +however, the CocoaPods registry permanently becomes +[read-only on December 2, 2026][cocoapods]. ::: +[cocoapods]: https://blog.cocoapods.org/CocoaPods-Specs-Repo/ +[Swift Package Manager]: https://www.swift.org/documentation/package-manager/ + Flutter UI components can be incrementally added into your existing iOS application using Swift packages. @@ -25,7 +23,7 @@ into your existing iOS application using Swift packages. * Flutter 3.44 or later * Xcode 15.0 or later -### Migrate from Legacy Integration (If Applicable) {: #migrate-legacy-integration} +### Migrate from legacy integration (if applicable) {: #migrate-legacy-integration} If you've already integrated Flutter into your iOS app using CocoaPods or embedded frameworks, @@ -273,5 +271,4 @@ You can now [add a Flutter screen][] to your existing iOS app. [add a Flutter screen]: /add-to-app/ios/add-flutter-screen [legacy integration guide]: /add-to-app/ios/project-setup-legacy -[become read-only on December 2, 2026]: https://blog.cocoapods.org/CocoaPods-Specs-Repo/ -[build modes]: /testing/build-modes \ No newline at end of file +[build modes]: /testing/build-modes diff --git a/sites/docs/src/content/add-to-app/macos/project-setup.md b/sites/docs/src/content/add-to-app/macos/project-setup.md index be04ea4ea7e..b58e554f9f8 100644 --- a/sites/docs/src/content/add-to-app/macos/project-setup.md +++ b/sites/docs/src/content/add-to-app/macos/project-setup.md @@ -4,6 +4,17 @@ shortTitle: Integrate Flutter description: Learn how to integrate a Flutter app into your existing macOS project. --- +:::note +As of the 3.44 release, Flutter uses [Swift Package Manager][] +to manage iOS and macOS native dependencies. +Flutter continues to support CocoaPods in maintenance mode, +however, the CocoaPods registry permanently becomes +[read-only on December 2, 2026][cocoapods]. +::: + +[cocoapods]: https://blog.cocoapods.org/CocoaPods-Specs-Repo/ +[Swift Package Manager]: https://www.swift.org/documentation/package-manager/ + Flutter UI components can be incrementally added into your existing macOS application using Swift packages. @@ -200,5 +211,4 @@ The example directory structure resembles the following: You can now [add a Flutter screen][] to your existing macOS app. [add a Flutter screen]: /add-to-app/macos/add-flutter-screen -[become read-only on December 2, 2026]: https://blog.cocoapods.org/CocoaPods-Specs-Repo/ -[build modes]: /testing/build-modes \ No newline at end of file +[build modes]: /testing/build-modes diff --git a/sites/docs/src/content/deployment/flavors-ios.md b/sites/docs/src/content/deployment/flavors-ios.md index 6dcc4df21e3..cd2ee898a32 100644 --- a/sites/docs/src/content/deployment/flavors-ios.md +++ b/sites/docs/src/content/deployment/flavors-ios.md @@ -469,7 +469,7 @@ and `production` in an iOS project called `flavors_example`. 1. Ensure that these bundle identifiers are included in your App ID and your App ID is [registered in your Apple Developer account][]. -[registered in your Apple Developer account]: https://developer.apple.com/help/account/identifiers/register-an-app-id/ +[registered in your Apple Developer account]: {{site.apple-dev}}/help/account/identifiers/register-an-app-id/ ### Bundle assets @@ -540,8 +540,8 @@ If you would like to add additional build settings for a specific build configuration, see Apple's [Adding a build configuration file to your project][]. -[build settings]: https://developer.apple.com/documentation/xcode/build-settings-reference/ -[Adding a build configuration file to your project]: https://developer.apple.com/documentation/xcode/adding-a-build-configuration-file-to-your-project +[build settings]: {{site.apple-dev}}/documentation/xcode/build-settings-reference/ +[Adding a build configuration file to your project]: {{site.apple-dev}}/documentation/xcode/adding-a-build-configuration-file-to-your-project ### Add additional customizations @@ -550,7 +550,7 @@ configurations, but there are many more that you can apply. To learn about them, see [Customizing the build schemes for a project][]. -[Customizing the build schemes for a project]: https://developer.apple.com/documentation/xcode/customizing-the-build-schemes-for-a-project +[Customizing the build schemes for a project]: {{site.apple-dev}}/documentation/xcode/customizing-the-build-schemes-for-a-project ## More information diff --git a/sites/docs/src/content/packages-and-plugins/developing-packages.md b/sites/docs/src/content/packages-and-plugins/developing-packages.md index 4644967a7d7..a124af4687a 100644 --- a/sites/docs/src/content/packages-and-plugins/developing-packages.md +++ b/sites/docs/src/content/packages-and-plugins/developing-packages.md @@ -462,7 +462,7 @@ Then use the following steps: The iOS platform code for your plugin is located in `Pods/Development Pods/hello/../../example/ios/.symlinks/plugins/hello/ios/Classes` in the Project Navigator. (If you are using `sharedDarwinSource`, -the path will end with `hello/darwin/Classes` instead.) +the path will end with `Flutter/hello/Sources/hello` instead.) You can run the example app by pressing the run (▶) button. @@ -490,7 +490,7 @@ visit the [Swift Package Manager for plugin authors][] guide. [Swift Package Manager for plugin authors]: /packages-and-plugins/swift-package-manager/for-plugin-authors -##### Add CocoaPod dependencies (Legacy) +##### Add CocoaPod dependencies (legacy) Flutter continues to support CocoaPods for backward compatibility. If your plugin needs to support developers who haven't migrated to Swift Package diff --git a/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md b/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md index 31c9274caad..09110e119ab 100644 --- a/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md +++ b/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md @@ -3,50 +3,62 @@ title: Swift Package Manager for app developers description: How to use Swift Package Manager for native iOS or macOS dependencies --- -:::warning -Flutter is migrating to [Swift Package Manager][] to manage iOS and macOS native -dependencies. -Flutter's support of Swift Package Manager is under development. -If you find a bug in Flutter's Swift Package Manager support, -[open an issue][]. -Swift Package Manager support is [off by default][]. -Flutter continues to support CocoaPods. +:::note +As of the 3.44 release, Flutter uses [Swift Package Manager][] +to manage iOS and macOS native dependencies. +Flutter continues to support CocoaPods in maintenance mode, +however, the CocoaPods registry permanently becomes +[read-only on December 2, 2026][cocoapods]. ::: -Flutter's Swift Package Manager integration has several benefits: +[cocoapods]: https://blog.cocoapods.org/CocoaPods-Specs-Repo/ +[Swift Package Manager]: https://www.swift.org/documentation/package-manager/ -1. **Provides access to the Swift package ecosystem**. - Flutter plugins can use the growing ecosystem of [Swift packages][]. -1. **Simplifies Flutter installation**. - Xcode includes Swift Package Manager. - You don't need to install Ruby and CocoaPods if your project uses - Swift Package Manager. +## How to turn on Swift Package Manager -[Swift Package Manager]: https://www.swift.org/documentation/package-manager/ -[off by default]: #how-to-turn-on-swift-package-manager -[Swift packages]: https://swiftpackageindex.com/ -[open an issue]: {{site.github}}/flutter/flutter/issues/new?template=2_bug.yml +As of the 3.44 release, Flutter's Swift Package Manager (SwiftPM) +support is on by default. +Upgrading Flutter and running your app automatically adds SwiftPM integration. +This makes your project download the Swift packages that +your Flutter plugins depend on. +To use an older Flutter version, +you might need to [remove Swift Package Manager integration][removeSPM] +from the app. -{% render "docs/swift-package-manager/how-to-enable-disable.md", site: site %} +Note that Flutter falls back to CocoaPods for dependencies that don't +yet support Swift Package Manager. -## How to add Swift Package Manager integration +[Optional] To check if your project is using SwiftPM: -### Add to a Flutter app +1. In Xcode, run the app. +1. Ensure that **Run Prepare Flutter Framework Script** runs as a pre-action + and that `FlutterGeneratedPluginSwiftPackage` is a target dependency. - - + -{% render "docs/swift-package-manager/migrate-ios-project.md", site: site %} +If you previously disabled SwiftPM, you might need to enable it with +`flutter config --enable-swift-package-manager`. - - +If automatic migration works for you, that's it! +You are done with this page. -{% render "docs/swift-package-manager/migrate-macos-project.md", site: site %} +## How to add Swift Package Manager integration manually - - +When you upgrade to Flutter 3.44 or later and run +your app, SwiftPM integration is automatically added. You only need +these instructions if problems occurred and you need to manually +add SwiftPM integration to your project. + +Most developers do not need to do this. + +If you experience a problem automatically migrating your +project to SwiftPM, please [file an issue][]. +Include the error message and, if possible, +include a copy of the following files in your issue: -### Add to a Flutter app _manually_ +* `ios/Runner.xcodeproj/project.pbxproj` +* `ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme` + (or the xcsheme for the flavor used) @@ -61,13 +73,17 @@ Flutter's Swift Package Manager integration has several benefits: +[file an issue]: {{site.github}}/flutter/flutter/issues/new?template=02_bug.yml + ### Add to an existing app (add-to-app) -Flutter's Swift Package Manager support doesn't work with add-to-app scenarios. +To use SwiftPM, consult one of the following pages, as appropriate: -To keep current on status updates, consult [flutter#146957][]. +* [Integrate a Flutter app into your iOS project][ios-add-2-app] +* [Integrate a Flutter app into your macOS project][macos-add-2-app] -[flutter#146957]: https://github.com/flutter/flutter/issues/146957 +[ios-add-2-app]: /add-to-app/ios/project-setup +[macos-add-2-app]: /add-to-app/macos/project-setup ### Add to a custom Xcode target @@ -76,23 +92,23 @@ products, like frameworks or unit tests. You can add Swift Package Manager integration to these custom Xcode targets. Follow the steps in -[How to add Swift Package Manager integration to a project _manually_][manualIntegration]. +[How to add Swift Package Manager integration][manualIntegration]. -In [Step 1][manualIntegrationStep1], list item 6 use your custom target instead -of the `Flutter` target. +In [Step 1][] for list item 6, +use your custom target instead of the `Flutter` target. -In [Step 2][manualIntegrationStep2], list item 6 use your custom target instead -of the `Flutter` target. +In [Step 2][] for list item 6, +use your custom target instead of the `Flutter` target. -[Xcode targets]: https://developer.apple.com/documentation/xcode/configuring-a-new-target-in-your-project -[manualIntegration]: /packages-and-plugins/swift-package-manager/for-app-developers/#how-to-add-swift-package-manager-integration-to-a-flutter-app-manually -[manualIntegrationStep1]: /packages-and-plugins/swift-package-manager/for-app-developers/#step-1-add-fluttergeneratedpluginswiftpackage-package-dependency -[manualIntegrationStep2]: /packages-and-plugins/swift-package-manager/for-app-developers/#step-2-add-run-prepare-flutter-framework-script-pre-action +[Xcode targets]: {{site.apple-dev}}/documentation/xcode/configuring-a-new-target-in-your-project +[manualIntegration]: #how-to-add-swift-package-manager-integration-manually +[Step 1]: #step-1-add-fluttergeneratedpluginswiftpackage-package-dependency +[Step 2]: #step-2-add-run-prepare-flutter-framework-script-pre-action ## How to remove Swift Package Manager integration -To add Swift Package Manager integration, the Flutter CLI migrates your project. -This migration updates your Xcode project to add Flutter plugin dependencies. +When your app is modified to support SwiftPM, +the Xcode project is updated to add Flutter plugin dependencies. To undo this migration: @@ -124,7 +140,7 @@ To undo this migration: 1. Go to **Product > Scheme > Edit Scheme**. -1. Expand the **Build** section in the left side bar. +1. Expand the **Build** section in the left sidebar. 1. Click **Pre-actions**. @@ -134,7 +150,7 @@ To undo this migration: -[Turn off Swift Package Manager]: /packages-and-plugins/swift-package-manager/for-app-developers/#how-to-turn-off-swift-package-manager +[Turn off Swift Package Manager]: #how-to-turn-off-swift-package-manager ## How to use a Swift Package Manager Flutter plugin that requires a higher OS version @@ -167,3 +183,44 @@ To use the plugin: ```sh flutter build macos --config-only ``` + +## How to turn off Swift Package Manager + +In general, don't do this. Remember that +the CocoaPods registry becomes read-only on December 2, 2026 +and disabling SwiftPM won't be allowed in the future. + +Disabling Swift Package Manager causes Flutter to use CocoaPods for all +dependencies. However, SwiftPM remains integrated with your project. +To remove Swift Package Manager integration completely from your project, +follow the [How to remove Swift Package Manager integration][removeSPM] +instructions. + +### Turn off SwiftPM for a single project + +In the project's `pubspec.yaml` file, under the `flutter` section, +set `enable-swift-package-manager` to `false` in the `config` subsection. + +```yaml title="pubspec.yaml" +# The following section is specific to Flutter packages. +flutter: + config: + enable-swift-package-manager: false +``` + +This turns off Swift Package Manager for all contributors to this project. + +### Turn off SwiftPM globally for all projects + +Run the following command: + +```sh +flutter config --no-enable-swift-package-manager +``` + +This turns off Swift Package Manager for the current user. + +If a project is incompatible with Swift Package Manager, +all contributors need to run this command. + +[removeSPM]: #how-to-remove-swift-package-manager-integration diff --git a/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-plugin-authors.md b/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-plugin-authors.md index 037ca5f7b75..31cd5393327 100644 --- a/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-plugin-authors.md +++ b/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-plugin-authors.md @@ -3,32 +3,21 @@ title: Swift Package Manager for plugin authors description: How to add Swift Package Manager compatibility to iOS and macOS plugins --- -:::warning -Flutter is migrating to [Swift Package Manager][] +:::note +As of the 3.44 release, Flutter uses [Swift Package Manager][] to manage iOS and macOS native dependencies. -Flutter's support of Swift Package Manager is under development. -If you find a bug in Flutter's Swift Package Manager support, -[open an issue][]. -Swift Package Manager support is [off by default][]. -Flutter continues to support CocoaPods. +Flutter continues to support CocoaPods in maintenance mode, +however, the CocoaPods registry permanently becomes +[read-only on December 2, 2026][cocoapods]. ::: -Flutter's Swift Package Manager integration has several benefits: - -1. **Provides access to the Swift package ecosystem**. - Flutter plugins can use the growing ecosystem of [Swift packages][]! -1. **Simplifies Flutter installation**. - Swift Package Manager is bundled with Xcode. - In the future, you won’t need to install Ruby and CocoaPods to target iOS or - macOS. - - +[cocoapods]: https://blog.cocoapods.org/CocoaPods-Specs-Repo/ [Swift Package Manager]: https://www.swift.org/documentation/package-manager/ -[off by default]: #how-to-turn-on-swift-package-manager -[Swift packages]: https://swiftpackageindex.com/ -[open an issue]: {{site.github}}/flutter/flutter/issues/new?template=2_bug.yml -{% render "docs/swift-package-manager/how-to-enable-disable.md", site: site %} +For information on how to turn SwiftPM off and on, visit +[Swift Package Manager for app developers][for-app-devs]. + +[for-app-devs]: /packages-and-plugins/swift-package-manager/for-app-developers ## How to add Swift Package Manager support to an existing Flutter plugin @@ -40,11 +29,12 @@ Flutter plugins should support _both_ Swift Package Manager and CocoaPods until further notice. Swift Package Manager adoption will be gradual. -Plugins that don't support CocoaPods won't be usable by projects that haven't +As of Flutter 3.44, plugins that don't support +CocoaPods aren't usable by projects that haven't migrated to Swift Package Manager yet. -Plugins that don't support Swift Package Manager can cause problems for projects -that have migrated. - +Plugins that don't support Swift Package Manager +can cause problems for projects that have migrated. +Please migrate your plugins as soon as possible. @@ -59,15 +49,20 @@ that have migrated. -## (Optional, but Recommended) Add plugin as local package in example app +## (Optional, but recommended) Add plugin as local package in example app -If your plugin includes an example, it is recommended to add the plugin as a local package in the example app. This is not required, but provides better Xcode support when editing the plugin's source code in the example app. See [issue #179032](https://github.com/flutter/flutter/issues/179032). +If your plugin includes an example, +it is recommended to add the plugin as a local package in the example app. +This is not required, but provides better Xcode support when editing +the plugin's source code in the example app. +Visit [issue #179032](https://github.com/flutter/flutter/issues/179032). ### Add plugin as local package 1. In a terminal navigate to `my_plugin`. -1. Run the following command to open the example app's workspace in Xcode, (replace `ios` with `macos` if your plugin targets macOS): +1. In Xcode, run the following command to open the example app's workspace, + (replace `ios` with `macos` as appropriate): ```bash open example/ios/Runner.xcworkspace @@ -77,13 +72,18 @@ open example/ios/Runner.xcworkspace ![Add Files to Runner](/assets/images/docs/development/packages-and-plugins/swift-package-manager/add-files-to-runner.png) -1. Select `my_plugin/ios/my_plugin` (or `macos` or `darwin` depending on what platforms your plugin supports). +1. Select `my_plugin/ios/my_plugin` + (or `macos` or `darwin`, as appropriate). -1. Make sure “Reference files in place” is selected (it should be the default), and click **Finish**. +1. Make sure “Reference files in place” is selected + (it should be the default), and click **Finish**. ![Select Reference files in place](/assets/images/docs/development/packages-and-plugins/swift-package-manager/reference-files-in-place.png) -This adds the plugin as a local package, but it will be referenced by absolute path, which is not desirable for distribution. To change it to a relative path, follow the steps below. +This adds the plugin as a local package, +but it's referenced by absolute path, +which isn't desirable for distribution. +To change it to a relative path, use the following instructions. ### Change to relative path @@ -106,6 +106,7 @@ This adds the plugin as a local package, but it will be referenced by absolute p ``` 1. And replace with relative path: + ```text path = ../../ios/my_plugin; sourceTree = "" ``` @@ -113,7 +114,8 @@ This adds the plugin as a local package, but it will be referenced by absolute p ## How to update unit tests in a plugin's example app -If your plugin has native XCTests, you might need to update them to work with +If your plugin has native XCTests, +you might need to update them to work with Swift Package Manager if one of the following is true: * You're using a CocoaPod dependency for the test. @@ -121,7 +123,7 @@ Swift Package Manager if one of the following is true: To update your unit tests: -1. Open your `example/ios/Runner.xcworkspace` in Xcode. +1. In Xcode, open your `example/ios/Runner.xcworkspace`. 1. If you were using a CocoaPod dependency for tests, such as `OCMock`, you'll want to remove it from your `Podfile` file. @@ -188,4 +190,4 @@ To update your unit tests: 1. Ensure tests pass **Product > Test**. -[library type recommendations]: https://developer.apple.com/documentation/packagedescription/product/library(name:type:targets:) +[library type recommendations]: {{site.apple-dev}}/documentation/packagedescription/product/library(name:type:targets:) diff --git a/sites/docs/src/content/platform-integration/ios/app-extensions.md b/sites/docs/src/content/platform-integration/ios/app-extensions.md index 96d5330872c..58f7290f005 100644 --- a/sites/docs/src/content/platform-integration/ios/app-extensions.md +++ b/sites/docs/src/content/platform-integration/ios/app-extensions.md @@ -113,7 +113,7 @@ information about the generated code and WidgetKit, see [Apple's app extension documentation]: {{site.apple-dev}}/app-extensions/ [Test your app with the simulator]: #test-extensions -[Share]: https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Share.html +[Share]: {{site.apple-dev}}/library/archive/documentation/General/Conceptual/ExtensibilityPG/Share.html ## Test an iOS app extension {: #test-extensions } @@ -271,7 +271,7 @@ By default, flutter view does not handle scroll gestures in a [Share][] extension. To support a scrollable list in the Share extension, follow [the instructions on GitHub][issue-164670]. -[Share]: https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Share.html +[Share]: {{site.apple-dev}}/library/archive/documentation/General/Conceptual/ExtensibilityPG/Share.html [issue-164670]: {{site.repo.flutter}}/issues/164670#issuecomment-2762124121 ### Open a Flutter app in an iOS app extension {: #creating-app-extension-uis-with-flutter } @@ -480,7 +480,7 @@ class ShareViewController: UIViewController { 8. [Test your app with the simulator][]. [Add an extension to your Flutter app]: #add-extension -[Share]: https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Share.html +[Share]: {{site.apple-dev}}/library/archive/documentation/General/Conceptual/ExtensibilityPG/Share.html [Test your app with the simulator]: #test-extensions ### Register plugins @@ -573,7 +573,7 @@ GeneratedPluginRegistrant.register(with: flutterEngine) 5. (Xcode) [Test your app with the simulator][]. [Add an extension to your Flutter app]: #add-extension -[Share]: https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Share.html +[Share]: {{site.apple-dev}}/library/archive/documentation/General/Conceptual/ExtensibilityPG/Share.html [Test your app with the simulator]: #test-extensions ## Constraints {: #constraints } diff --git a/sites/docs/src/content/platform-integration/ios/setup.md b/sites/docs/src/content/platform-integration/ios/setup.md index b89a1fc879e..530e2621e55 100644 --- a/sites/docs/src/content/platform-integration/ios/setup.md +++ b/sites/docs/src/content/platform-integration/ios/setup.md @@ -87,7 +87,7 @@ an iOS physical device or on the iOS Simulator. {: .steps} -[xcode]: https://developer.apple.com/xcode/ +[xcode]: {{site.apple-dev}}/xcode/ [cocoapods]: https://guides.cocoapods.org/using/getting-started.html#installation [Flutter plugins]: /packages-and-plugins/developing-packages#types [CocoaPods installation guide]: https://guides.cocoapods.org/using/getting-started.html#installation diff --git a/sites/docs/src/content/platform-integration/macos/setup.md b/sites/docs/src/content/platform-integration/macos/setup.md index a97ab4c906f..e1880a73118 100644 --- a/sites/docs/src/content/platform-integration/macos/setup.md +++ b/sites/docs/src/content/platform-integration/macos/setup.md @@ -80,7 +80,7 @@ compile and debug native Swift and Objective-C code. {: .steps} -[xcode]: https://developer.apple.com/xcode/ +[xcode]: {{site.apple-dev}}/xcode/ [Flutter plugins]: /packages-and-plugins/developing-packages#types [CocoaPods]: https://cocoapods.org/ [CocoaPods installation guide]: https://guides.cocoapods.org/using/getting-started.html#installation diff --git a/sites/docs/src/content/release/archive-whats-new.md b/sites/docs/src/content/release/archive-whats-new.md index f8a82e23df0..85e014501ee 100644 --- a/sites/docs/src/content/release/archive-whats-new.md +++ b/sites/docs/src/content/release/archive-whats-new.md @@ -170,7 +170,7 @@ This website release includes several important updates! [Intro to Dart][] page. * Further support and updated docs for the Swift Package Manager. - Specifically, you can now build on the stable channel for SPM, + Specifically, you can now build on the stable channel for SwiftPM, however, plugins will continue to be installed using CocoaPods as the SwiftPM feature remains unavailable on the stable channel: diff --git a/sites/docs/src/content/release/release-notes/release-notes-3.35.0.md b/sites/docs/src/content/release/release-notes/release-notes-3.35.0.md index 74e7fe39dcd..c4802fc02c8 100644 --- a/sites/docs/src/content/release/release-notes/release-notes-3.35.0.md +++ b/sites/docs/src/content/release/release-notes/release-notes-3.35.0.md @@ -585,7 +585,7 @@ check out the Flutter [CHANGELOG][]. * [native assets] Roll dependencies by @dcharkes in [167984](https://github.com/flutter/flutter/pull/167984) * [tool] Add a telemetry event to track SwiftPM migration by @loic-sharma in [166773](https://github.com/flutter/flutter/pull/166773) * feat: Arbitrary format options for localizations generation (#102983) by @Gustl22 in [167029](https://github.com/flutter/flutter/pull/167029) -* Migrate SPM OS minimums to iOS 13, macOS 10.15 by @cbracken in [168153](https://github.com/flutter/flutter/pull/168153) +* Migrate SwiftPM OS minimums to iOS 13, macOS 10.15 by @cbracken in [168153](https://github.com/flutter/flutter/pull/168153) * [native assets] Roll dependencies by @dcharkes in [168139](https://github.com/flutter/flutter/pull/168139) * Share common logic between UnpackMacOS and UnpackIOS build targets by @vashworth in [168034](https://github.com/flutter/flutter/pull/168034) * Add metrics for android gradle plugin version by @mboetger in [168181](https://github.com/flutter/flutter/pull/168181) diff --git a/sites/docs/src/content/release/release-notes/release-notes-3.44.0.md b/sites/docs/src/content/release/release-notes/release-notes-3.44.0.md index a65ff18451d..f43f0287dc9 100644 --- a/sites/docs/src/content/release/release-notes/release-notes-3.44.0.md +++ b/sites/docs/src/content/release/release-notes/release-notes-3.44.0.md @@ -639,7 +639,7 @@ This page has release notes for Flutter 3.44. * Improve error message when `dart-define` content are not `base64 encoded` and add more test cases by @AbdeMohlbi in [184219](https://github.com/flutter/flutter/pull/184219) * [ Widget Preview ] Use analysis server for widget preview detection by @bkonyi in [184473](https://github.com/flutter/flutter/pull/184473) * [data_assets] Cleanup tests by @dcharkes in [184209](https://github.com/flutter/flutter/pull/184209) -* Enable SPM by default on Stable by @okorohelijah in [184495](https://github.com/flutter/flutter/pull/184495) +* Enable SwiftPM by default on Stable by @okorohelijah in [184495](https://github.com/flutter/flutter/pull/184495) * [ Widget Preview ] Handle collections and records in custom preview annotations by @bkonyi in [184518](https://github.com/flutter/flutter/pull/184518) * forward an application name to DDS by @jakemac53 in [184459](https://github.com/flutter/flutter/pull/184459) * Reverts "[data_assets] Cleanup tests (#184209)" by @auto-submit[bot] in [184575](https://github.com/flutter/flutter/pull/184575)