Skip to content

Commit

Permalink
Add support for Privacy Manifest (#628)
Browse files Browse the repository at this point in the history
* Add manifest

* Update podspec

* Update Package.swift

* Clean up Package.swift

* Update Pageboy project required version

* Use mac-os14 runner

* Use latest Xcode
  • Loading branch information
msaps authored Apr 6, 2024
1 parent 2f0c9e7 commit c8a327d
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ on:

jobs:
Test:
runs-on: macOS-latest
runs-on: macOS-14
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/checkout@v2
- name: Prepare
run: |
Expand Down
16 changes: 16 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "Pageboy",
"repositoryURL": "https://github.com/uias/Pageboy",
"state": {
"branch": null,
"revision": "cd9f976a7d92f4fb56965c15da65b4c1b35b2460",
"version": "4.1.0"
}
}
]
},
"version": 1
}
12 changes: 5 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version:5.10

import PackageDescription

let package = Package(
Expand All @@ -16,14 +16,12 @@ let package = Package(
.package(url: "https://github.com/uias/Pageboy", from: "4.1.0")
],
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: "Tabman",
dependencies: ["Pageboy"],
path: ".",
exclude: ["Sources/Tabman/Tabman.h", "Sources/Tabman/Info.plist"],
sources: ["Sources/Tabman"],
path: "Sources/Tabman",
exclude: ["Tabman.h", "Info.plist", "PrivacyInfo.xcprivacy"],
resources: [.process("PrivacyInfo.xcprivacy")],
linkerSettings: [
.linkedFramework("UIKit")
]
Expand Down
4 changes: 3 additions & 1 deletion Sources/Tabman.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
D62AC0C21E5733810020B8AE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D62AC0F41E5733FE0020B8AE /* TabmanViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabmanViewController.swift; sourceTree = "<group>"; };
D65F101C1EAEA2730090980C /* Pageboy.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Pageboy.framework; path = ../Carthage/Build/iOS/Pageboy.framework; sourceTree = "<group>"; };
E8529AE72BC1384200C96B7B /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -471,6 +472,7 @@
isa = PBXGroup;
children = (
D62AC0B51E5733810020B8AE /* Tabman.h */,
E8529AE72BC1384200C96B7B /* PrivacyInfo.xcprivacy */,
D62AC0F41E5733FE0020B8AE /* TabmanViewController.swift */,
464264DE217E12A20001C4AF /* TabmanViewController+Insets.swift */,
46B7FDF920BC52D000E9BB7E /* Bar */,
Expand Down Expand Up @@ -990,7 +992,7 @@
repositoryURL = "https://github.com/uias/Pageboy";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 4.0.0;
minimumVersion = 4.1.0;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
14 changes: 14 additions & 0 deletions Sources/Tabman/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>
2 changes: 2 additions & 0 deletions Tabman.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/uias/Tabman.git", :tag => s.version.to_s }
s.source_files = "Sources/Tabman/**/*.{h,m,swift}"

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

s.dependency 'Pageboy', '~> 4.1.0'

end

0 comments on commit c8a327d

Please sign in to comment.