@@ -479,10 +479,10 @@ Then use the following steps:
479479The iOS platform code for your plugin is located in
480480` hello/ios/hello/Sources/hello`
481481(or `hello/darwin/hello/Sources/hello` if using `sharedDarwinSource`).
482- To edit your plugin code with full Xcode support in the example app,
483- refer to [Add plugin as local package in example app][].
482+ In the Project Navigator, it's under **Runner** > **Flutter** > **hello**.
484483
485- If you are using legacy CocoaPods, the platform code is located under
484+ If your plugin uses the legacy CocoaPods structure,
485+ its platform code is located under
486486` Pods/Development Pods/hello/../../example/ios/.symlinks/plugins/hello/ios/Classes`
487487in the Project Navigator.
488488
@@ -547,36 +547,35 @@ pod files during the native app build step.
547547
548548If your plugin requires a privacy manifest, for example,
549549if it uses any **required reason APIs**,
550- update the `PrivacyInfo.xcprivacy` file to
550+ update the `hello/ios/hello/Sources/hello/ PrivacyInfo.xcprivacy` file to
551551describe your plugin's privacy impact.
552+ Then uncomment the `PrivacyInfo.xcprivacy` resource
553+ in your plugin's `Package.swift` file :
552554
553- With Swift Package Manager, place `PrivacyInfo.xcprivacy` in your plugin's
554- ` Resources` directory
555- (such as `hello/ios/hello/Sources/hello/Resources/PrivacyInfo.xcprivacy`).
556- Declare the resource in your `Package.swift` file :
557-
558- ` ` ` swift title="Package.swift"
555+ ` ` ` swift title="Package.swift" highlightLines=8
559556targets: [
560557 .target(
561558 name: "hello",
559+ dependencies: [
560+ .product(name: "FlutterFramework", package: "FlutterFramework")
561+ ],
562562 resources: [
563- .process("Resources/ PrivacyInfo.xcprivacy"),
563+ .process("PrivacyInfo.xcprivacy"),
564564 ]
565- ),
565+ )
566566]
567567` ` `
568568
569- If your plugin also supports CocoaPods for backward compatibility ,
570- add the following to the bottom of your `.podspec` file :
569+ To also include the privacy manifest when your plugin is used with CocoaPods ,
570+ uncomment the following line in your `hello .podspec` file :
571571
572- ` ` ` ruby
573- s.resource_bundles = {'your_plugin_privacy ' => ['your_plugin /Sources/your_plugin/Resources /PrivacyInfo.xcprivacy']}
572+ ` ` ` ruby title="hello.podspec"
573+ s.resource_bundles = {'hello_privacy ' => ['hello /Sources/hello /PrivacyInfo.xcprivacy']}
574574` ` `
575575
576576For more information,
577577consult [Privacy manifest files][] on the Apple developer site.
578578
579- [Add plugin as local package in example app] : /packages-and-plugins/swift-package-manager/for-plugin-authors#optional-but-recommended-add-plugin-as-local-package-in-example-app
580579[Privacy manifest files] : {{site.apple-dev}}/documentation/bundleresources/privacy_manifest_files
581580
582581# ### Step 2d: Add Linux platform code (.h+.cc)
0 commit comments