Skip to content

Commit ca9ac8e

Browse files
committed
Minor adjustments and clean up
1 parent be426a3 commit ca9ac8e

5 files changed

Lines changed: 26 additions & 25 deletions

File tree

‎sites/docs/src/content/flutter-for/uikit-devs.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,9 +531,9 @@ In iOS, you typically manage dependencies using Swift Package Manager
531531
in Xcode (or CocoaPods in older projects).
532532
Flutter uses Dart's build system and the `pub` package manager
533533
to handle dependencies.
534-
Flutter automatically integrates native iOS dependencies
534+
Flutter automatically integrates the native iOS dependencies of plugins
535535
using [Swift Package Manager][] by default,
536-
while supporting CocoaPods as a fallback for backward compatibility.
536+
and falls back to CocoaPods for plugins that don't support it yet.
537537

538538
In general, declare your external dependencies in `pubspec.yaml`.
539539
To find packages and plugins for Flutter, visit [pub.dev][].

‎sites/docs/src/content/packages-and-plugins/developing-packages.md‎

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -479,10 +479,10 @@ Then use the following steps:
479479
The 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`
487487
in the Project Navigator.
488488

@@ -547,36 +547,35 @@ pod files during the native app build step.
547547

548548
If your plugin requires a privacy manifest, for example,
549549
if 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
551551
describe 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
559556
targets: [
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

576576
For more information,
577577
consult [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)

‎sites/docs/src/content/platform-integration/ios/app-extensions.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ called `Runner`, and the Flutter app is called
517517
518518
1. In Xcode, link Flutter plugins to your app extension target.
519519
520-
<Tabs key="link-plugins-tabs" wrapped="true">
520+
<Tabs key="plugin-dependency-manager" wrapped="true">
521521
522522
<Tab name="Swift Package Manager (default)">
523523
@@ -546,13 +546,14 @@ called `Runner`, and the Flutter app is called
546546
If your project uses CocoaPods, open `ios/Podfile` and ensure
547547
your extension target inherits the search paths from `Runner`:
548548
549-
```ruby title="ios/Podfile"
549+
```ruby title="ios/Podfile" highlightLines=8-10
550550
target 'Runner' do
551551
use_frameworks!
552-
use_modular_headers!
553552
554553
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
555-
554+
target 'RunnerTests' do
555+
inherit! :search_paths
556+
end
556557
target 'ShareExtension' do
557558
inherit! :search_paths
558559
end

‎sites/docs/src/content/platform-integration/ios/ios-app-clip.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ refer to [Swift Package Manager for app developers][].
339339
```
340340

341341
At the top of the file,
342-
uncomment `platform :ios, '13.0'` and set the
342+
uncomment the `platform :ios` line and set the
343343
version to the lowest of the two targets' iOS
344344
Deployment Target.
345345
@@ -358,7 +358,7 @@ refer to [Swift Package Manager for app developers][].
358358
install_all_flutter_pods(flutter_application_path)
359359
end
360360
361-
target '<name of your App Clip target>'
361+
target '<name of your App Clip target>' do
362362
install_all_flutter_pods(flutter_application_path)
363363
end
364364
```

‎sites/docs/src/content/platform-integration/platform-channels.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ create your `FlutterMethodChannel` in the `didInitializeImplicitFlutterEngine` m
710710
:::
711711

712712
```objc title="AppDelegate.m"
713+
#import "AppDelegate.h"
713714
#import <Flutter/Flutter.h>
714715
#import "GeneratedPluginRegistrant.h"
715716

0 commit comments

Comments
 (0)