Skip to content

Commit f5f98ce

Browse files
hitsubunnuclaude
andauthored
Add PrivacyInfo.xcprivacy for Apple privacy manifest compliance (#44)
* Add PrivacyInfo.xcprivacy for Apple privacy manifest compliance Add privacy manifest file to comply with Apple's SDK privacy requirements starting from Spring 2024. The manifest declares that QRScanner: - Does not track users - Does not collect user data - Does not use Required Reason APIs Closes #42 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix CI: remove hardcoded iOS version from simulator destination Allow xcodebuild to use the latest available iOS version instead of requiring a specific version that may not exist on the runner. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Improve CI workflow configuration - Add separate build job to verify framework compilation - Add SPM build job to verify Swift Package Manager compatibility - Add timeout-minutes to prevent hanging jobs - Use stable device name (iPhone 15 Pro) for simulator tests - Remove unnecessary matrix strategy for single destination - Simplify and clean up configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix SPM build for iOS-only library - Exclude PrivacyInfo.xcprivacy from SPM target - Use xcodebuild instead of swift build for iOS library - swift build defaults to macOS which lacks UIKit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix CI: use iPhone 16 simulator available on GitHub runner 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Improve Package.swift configuration - Upgrade swift-tools-version to 5.9 - Include PrivacyInfo.xcprivacy as resource for SPM privacy manifest support - Use .process() for Images.xcassets for proper asset compilation - Remove unnecessary empty dependencies array 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e94bc2a commit f5f98ce

4 files changed

Lines changed: 46 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,29 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
test:
11-
name: UnitTest
12-
runs-on: macOS-latest
13-
strategy:
14-
matrix:
15-
destination: ['platform=iOS Simulator,OS=18.0,name=iPhone 16 Pro Max']
10+
build:
11+
name: Build
12+
runs-on: macos-latest
13+
timeout-minutes: 15
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Build framework
17+
run: xcodebuild build -scheme QRScanner -destination 'generic/platform=iOS' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
1618

19+
test:
20+
name: Test
21+
runs-on: macos-latest
22+
timeout-minutes: 15
1723
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v4
20-
- name: Select latest Xcode
21-
run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
24+
- uses: actions/checkout@v4
2225
- name: Run unit tests
23-
run: xcodebuild test -workspace QRScanner.xcworkspace -scheme UnitTests -destination "${destination}" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
24-
env:
25-
destination: ${{ matrix.destination }}
26+
run: xcodebuild test -workspace QRScanner.xcworkspace -scheme UnitTests -destination 'platform=iOS Simulator,name=iPhone 16' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
27+
28+
spm:
29+
name: Swift Package Manager
30+
runs-on: macos-latest
31+
timeout-minutes: 10
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Build with SPM
35+
run: xcodebuild build -scheme QRScanner -destination 'generic/platform=iOS Simulator'

Package.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.3
1+
// swift-tools-version:5.9
22

33
import PackageDescription
44

@@ -13,14 +13,16 @@ let package = Package(
1313
targets: ["QRScanner"]
1414
),
1515
],
16-
dependencies: [],
1716
targets: [
1817
.target(
1918
name: "QRScanner",
20-
dependencies: [],
2119
path: "QRScanner",
2220
exclude: [
2321
"Info.plist",
22+
],
23+
resources: [
24+
.process("Images.xcassets"),
25+
.copy("PrivacyInfo.xcprivacy"),
2426
]
2527
),
2628
]

QRScanner.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
16A16403235710D80032684C /* QRScannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16A16402235710D80032684C /* QRScannerView.swift */; };
1111
16A16405235711240032684C /* QRScannerError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16A16404235711240032684C /* QRScannerError.swift */; };
1212
16A16407235712360032684C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 16A16406235712360032684C /* Images.xcassets */; };
13+
16A16408235712370032684C /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 16A16409235712380032684C /* PrivacyInfo.xcprivacy */; };
1314
16D0D5EE23570BC800A2EC78 /* QRScanner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 16D0D5E423570BC800A2EC78 /* QRScanner.framework */; };
1415
16D0D5F523570BC800A2EC78 /* QRScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 16D0D5E723570BC800A2EC78 /* QRScanner.h */; settings = {ATTRIBUTES = (Public, ); }; };
1516
43820BFF256A29DD0046AC78 /* Bundle+Module.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43820BFE256A29DD0046AC78 /* Bundle+Module.swift */; };
@@ -32,6 +33,7 @@
3233
16A16402235710D80032684C /* QRScannerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRScannerView.swift; sourceTree = "<group>"; };
3334
16A16404235711240032684C /* QRScannerError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRScannerError.swift; sourceTree = "<group>"; };
3435
16A16406235712360032684C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
36+
16A16409235712380032684C /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
3537
16D0D5E423570BC800A2EC78 /* QRScanner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = QRScanner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3638
16D0D5E723570BC800A2EC78 /* QRScanner.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QRScanner.h; sourceTree = "<group>"; };
3739
16D0D5E823570BC800A2EC78 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -89,6 +91,7 @@
8991
43820BFF256A29DD0046AC79 /* QRScannerSwiftUIView.swift */,
9092
16A16404235711240032684C /* QRScannerError.swift */,
9193
16D0D5E823570BC800A2EC78 /* Info.plist */,
94+
16A16409235712380032684C /* PrivacyInfo.xcprivacy */,
9295
16A16406235712360032684C /* Images.xcassets */,
9396
);
9497
path = QRScanner;
@@ -214,6 +217,7 @@
214217
buildActionMask = 2147483647;
215218
files = (
216219
16A16407235712360032684C /* Images.xcassets in Resources */,
220+
16A16408235712370032684C /* PrivacyInfo.xcprivacy in Resources */,
217221
);
218222
runOnlyForDeploymentPostprocessing = 0;
219223
};

QRScanner/PrivacyInfo.xcprivacy

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>NSPrivacyTracking</key>
6+
<false/>
7+
<key>NSPrivacyTrackingDomains</key>
8+
<array/>
9+
<key>NSPrivacyCollectedDataTypes</key>
10+
<array/>
11+
<key>NSPrivacyAccessedAPITypes</key>
12+
<array/>
13+
</dict>
14+
</plist>

0 commit comments

Comments
 (0)