website icon indicating copy to clipboard operation
website copied to clipboard

Add a "Choose your platform implementation directory" dropdown to SwiftPM plugin migration docs

Open loic-sharma opened this issue 1 year ago • 1 comments

Problem

For the plugin migration docs, the top-level folder that contains your plugin's code can be ios, macos, or darwin. Our guide states we'll use ios in our instructions, and that the reader should use whatever is the correct value for their plugin:

The example below uses ios, replace ios with macos/darwin as applicable.

For example, step 11 says:

  1. Update your ios/plugin_name.podspec to point to new paths.

If the plugin uses the darwin directory, that file will actually be at darwin/plugin_name.podspec.

This could be confusing for readers.

Solution

The first step in the migration guide could be "Choose your platform implementation directory: " and a dropdown with values ios, macos, or darwin.

Once you select an implementation folder, the guide's text would update automatically to use all the correct paths.

This was feedback from the walkthrough: https://github.com/flutter/flutter/issues/152276

Part of https://github.com/flutter/flutter/issues/126005

cc @parlough

loic-sharma avatar Jul 30 '24 20:07 loic-sharma