这是indexloc提供的服务,不要输入任何密码
Skip to content

Add PrivacyInfo.xcprivacy to plugin template #148485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,15 @@ Pod::Spec.new do |s|

# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }

# If your plugin requires a privacy manifest, 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 https://developer.apple.com/documentation/bundleresources/privacy_manifest_files
{{#withSwiftPackageManager}}
# s.resource_bundles = {'{{projectName}}_privacy' => ['{{projectName}}/Sources/{{projectName}}/PrivacyInfo.xcprivacy']}
{{/withSwiftPackageManager}}
{{^withSwiftPackageManager}}
# s.resource_bundles = {'{{projectName}}_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
{{/withSwiftPackageManager}}
end
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,15 @@ Pod::Spec.new do |s|
# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
s.swift_version = '5.0'

# If your plugin requires a privacy manifest, 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 https://developer.apple.com/documentation/bundleresources/privacy_manifest_files
{{#withSwiftPackageManager}}
# s.resource_bundles = {'{{projectName}}_privacy' => ['{{projectName}}/Sources/{{projectName}}/PrivacyInfo.xcprivacy']}
{{/withSwiftPackageManager}}
{{^withSwiftPackageManager}}
# s.resource_bundles = {'{{projectName}}_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
{{/withSwiftPackageManager}}
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ let package = Package(
name: "{{projectName}}",
dependencies: [],
resources: [
.process("Resources"),
// If your plugin requires a privacy manifest, for example if it uses any required
// reason APIs, update the PrivacyInfo.xcprivacy file to describe your plugin's
// privacy impact, and then uncomment these lines. For more information, see
// https://developer.apple.com/documentation/bundleresources/privacy_manifest_files
// .process("PrivacyInfo.xcprivacy"),

// If you have other resources that need to be bundled with your plugin, refer to
// the following instructions to add them:
// https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package
],
cSettings: [
.headerSearchPath("include/{{projectName}}"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ let package = Package(
name: "{{projectName}}",
dependencies: [],
resources: [
.process("Resources"),
// If your plugin requires a privacy manifest, for example if it uses any required
// reason APIs, update the PrivacyInfo.xcprivacy file to describe your plugin's
// privacy impact, and then uncomment these lines. For more information, see
// https://developer.apple.com/documentation/bundleresources/privacy_manifest_files
// .process("PrivacyInfo.xcprivacy"),

// If you have other resources that need to be bundled with your plugin, refer to
// the following instructions to add them:
// https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package
]
)
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>
3 changes: 2 additions & 1 deletion packages/flutter_tools/templates/template_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,14 +337,15 @@
"templates/plugin_cocoapods/ios-objc.tmpl/Classes/pluginClass.m.tmpl",
"templates/plugin_cocoapods/ios-swift.tmpl/Classes/pluginClass.swift.tmpl",
"templates/plugin_cocoapods/ios.tmpl/Assets/.gitkeep",
"templates/plugin_cocoapods/ios.tmpl/Resources/PrivacyInfo.xcprivacy",
"templates/plugin_cocoapods/macos.tmpl/Classes/pluginClass.swift.tmpl",

"templates/plugin_swift_package_manager/ios-objc.tmpl/projectName.tmpl/Sources/projectName.tmpl/include/projectName.tmpl/pluginClass.h.tmpl",
"templates/plugin_swift_package_manager/ios-objc.tmpl/projectName.tmpl/Sources/projectName.tmpl/pluginClass.m.tmpl",
"templates/plugin_swift_package_manager/ios-objc.tmpl/projectName.tmpl/Package.swift.tmpl",
"templates/plugin_swift_package_manager/ios-swift.tmpl/projectName.tmpl/Sources/projectName.tmpl/pluginClass.swift.tmpl",
"templates/plugin_swift_package_manager/ios-swift.tmpl/projectName.tmpl/Package.swift.tmpl",
"templates/plugin_swift_package_manager/ios.tmpl/projectName.tmpl/Sources/projectName.tmpl/Resources/.gitkeep",
"templates/plugin_swift_package_manager/ios.tmpl/projectName.tmpl/Sources/projectName.tmpl/PrivacyInfo.xcprivacy",
"templates/plugin_swift_package_manager/macos.tmpl/projectName.tmpl/Sources/projectName.tmpl/Resources/.gitkeep",
"templates/plugin_swift_package_manager/macos.tmpl/projectName.tmpl/Sources/projectName.tmpl/pluginClass.swift.tmpl",
"templates/plugin_swift_package_manager/macos.tmpl/projectName.tmpl/Package.swift.tmpl",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ void main() {
'example/ios/Runner/Runner-Bridging-Header.h',
'example/lib/main.dart',
'ios/Classes/FlutterProjectPlugin.swift',
'ios/Resources/PrivacyInfo.xcprivacy',
'lib/flutter_project.dart',
],
unexpectedPaths: <String>[
Expand All @@ -726,7 +727,7 @@ void main() {
<String>[
'ios/flutter_project/Package.swift',
'ios/flutter_project/Sources/flutter_project/FlutterProjectPlugin.swift',
'ios/flutter_project/Sources/flutter_project/Resources/.gitkeep',
'ios/flutter_project/Sources/flutter_project/PrivacyInfo.xcprivacy',
'macos/flutter_project/Package.swift',
'macos/flutter_project/Sources/flutter_project/FlutterProjectPlugin.swift',
'macos/flutter_project/Sources/flutter_project/Resources/.gitkeep',
Expand Down Expand Up @@ -755,7 +756,7 @@ void main() {
'ios/flutter_project/Package.swift',
'ios/flutter_project/Sources/flutter_project/include/flutter_project/FlutterProjectPlugin.h',
'ios/flutter_project/Sources/flutter_project/FlutterProjectPlugin.m',
'ios/flutter_project/Sources/flutter_project/Resources/.gitkeep',
'ios/flutter_project/Sources/flutter_project/PrivacyInfo.xcprivacy',
],
unexpectedPaths: <String>[
'ios/Classes/FlutterProjectPlugin.swift',
Expand Down