Skip to content

Commit

Permalink
Add support for Privacy Manifest (#291)
Browse files Browse the repository at this point in the history
* Clean up Package.swift

* Add PrivacyInfo.xcprivacy

* Fix SPM platform support

* Update Package to process PrivacyInfo

* Add to podspec
  • Loading branch information
msaps authored Apr 6, 2024
1 parent 4028319 commit 95ee98f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
// swift-tools-version:5.0
// swift-tools-version:5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Pageboy",
platforms: [
.iOS(.v11),
.tvOS(.v11)
.iOS(.v12),
.tvOS(.v12)
],
products: [
.library(
name: "Pageboy",
targets: ["Pageboy"])
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "Pageboy",
path: "Sources/Pageboy",
exclude: ["Pageboy.h"]
exclude: ["Pageboy.h", "PrivacyInfo.xcprivacy"],
resources: [.process("PrivacyInfo.xcprivacy")]
),
.testTarget(
name: "PageboyTests",
Expand Down
2 changes: 2 additions & 0 deletions Pageboy.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/uias/Pageboy.git", :tag => s.version.to_s }
s.source_files = "Sources/Pageboy/**/*.{h,m,swift}"

s.resource_bundles = {'Pageboy' => ['Sources/Pageboy/PrivacyInfo.xcprivacy']}

end
2 changes: 2 additions & 0 deletions Sources/Pageboy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
D681E34A1E548C0E007C08F5 /* PageboyConfigurationTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PageboyConfigurationTests.swift; sourceTree = "<group>"; };
D681E34C1E548D12007C08F5 /* TestPageboyDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestPageboyDelegate.swift; sourceTree = "<group>"; };
D69816B91E829043004096BA /* PageboyPropertyTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PageboyPropertyTests.swift; sourceTree = "<group>"; };
E8529ACB2BC1328B00C96B7B /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -237,6 +238,7 @@
isa = PBXGroup;
children = (
D623B1BA1E1D0C6A00527F3D /* Pageboy.h */,
E8529ACB2BC1328B00C96B7B /* PrivacyInfo.xcprivacy */,
D623B1D11E1D2DF200527F3D /* PageboyViewController.swift */,
46ADAAC7208F7EB200974529 /* PageboyViewController+Management.swift */,
46ADAAC6208F7EB100974529 /* PageboyViewController+ScrollDetection.swift */,
Expand Down
14 changes: 14 additions & 0 deletions Sources/Pageboy/PrivacyInfo.xcprivacy
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>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTrackingDomains</key>
<array/>
</dict>
</plist>

0 comments on commit 95ee98f

Please sign in to comment.