Skip to content

Commit edd6ff3

Browse files
committed
Docs: Add manual plugin linking instructions for SPM (#12936)
1 parent bf52953 commit edd6ff3

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/content/packages-and-plugins/swift-package-manager/for-plugin-authors.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,34 @@ that have migrated.
5656

5757
{% render "docs/swift-package-manager/migrate-objective-c-plugin.md", site: site %}
5858

59+
</Tab>
5960
</Tab>
6061
</Tabs>
6162

63+
## Manually add the plugin to the example app
64+
65+
Flutter attempts to automatically add your plugin as a local package dependency
66+
to your example app's Xcode project.
67+
However, if this fails or if you need to debug the integration,
68+
you can add it manually:
69+
70+
1. Open `example/ios/Runner.xcworkspace` in Xcode.
71+
72+
1. Navigate to **Package Dependencies** for the project.
73+
74+
1. Click the <Icon id="add" label="plus/add"></Icon> button.
75+
76+
1. In the dialog that opens, click the **Add Local...** button.
77+
78+
1. Navigate to your plugin's root iOS directory (the folder containing `Package.swift`)
79+
and click **Add Package**.
80+
81+
1. Select your plugin's library product and ensure it is added to the **Runner** target.
82+
83+
1. Click **Add Package**.
84+
85+
This overrides the published version of the plugin (if any) with your local source code.
86+
6287
## How to update unit tests in a plugin's example app
6388

6489
If your plugin has native XCTests, you might need to update them to work with

0 commit comments

Comments
 (0)