From 465e01b6c33fe444e6efc231372aa64bac7b246e Mon Sep 17 00:00:00 2001 From: hitsubunnu Date: Sun, 21 Dec 2025 16:24:09 +0900 Subject: [PATCH 1/6] Add PrivacyInfo.xcprivacy for Apple privacy manifest compliance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- QRScanner.xcodeproj/project.pbxproj | 4 ++++ QRScanner/PrivacyInfo.xcprivacy | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 QRScanner/PrivacyInfo.xcprivacy diff --git a/QRScanner.xcodeproj/project.pbxproj b/QRScanner.xcodeproj/project.pbxproj index d6bfdde..ae718bf 100644 --- a/QRScanner.xcodeproj/project.pbxproj +++ b/QRScanner.xcodeproj/project.pbxproj @@ -10,6 +10,7 @@ 16A16403235710D80032684C /* QRScannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16A16402235710D80032684C /* QRScannerView.swift */; }; 16A16405235711240032684C /* QRScannerError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16A16404235711240032684C /* QRScannerError.swift */; }; 16A16407235712360032684C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 16A16406235712360032684C /* Images.xcassets */; }; + 16A16408235712370032684C /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 16A16409235712380032684C /* PrivacyInfo.xcprivacy */; }; 16D0D5EE23570BC800A2EC78 /* QRScanner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 16D0D5E423570BC800A2EC78 /* QRScanner.framework */; }; 16D0D5F523570BC800A2EC78 /* QRScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 16D0D5E723570BC800A2EC78 /* QRScanner.h */; settings = {ATTRIBUTES = (Public, ); }; }; 43820BFF256A29DD0046AC78 /* Bundle+Module.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43820BFE256A29DD0046AC78 /* Bundle+Module.swift */; }; @@ -32,6 +33,7 @@ 16A16402235710D80032684C /* QRScannerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRScannerView.swift; sourceTree = ""; }; 16A16404235711240032684C /* QRScannerError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRScannerError.swift; sourceTree = ""; }; 16A16406235712360032684C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 16A16409235712380032684C /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 16D0D5E423570BC800A2EC78 /* QRScanner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = QRScanner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 16D0D5E723570BC800A2EC78 /* QRScanner.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QRScanner.h; sourceTree = ""; }; 16D0D5E823570BC800A2EC78 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -89,6 +91,7 @@ 43820BFF256A29DD0046AC79 /* QRScannerSwiftUIView.swift */, 16A16404235711240032684C /* QRScannerError.swift */, 16D0D5E823570BC800A2EC78 /* Info.plist */, + 16A16409235712380032684C /* PrivacyInfo.xcprivacy */, 16A16406235712360032684C /* Images.xcassets */, ); path = QRScanner; @@ -214,6 +217,7 @@ buildActionMask = 2147483647; files = ( 16A16407235712360032684C /* Images.xcassets in Resources */, + 16A16408235712370032684C /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/QRScanner/PrivacyInfo.xcprivacy b/QRScanner/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..e08a130 --- /dev/null +++ b/QRScanner/PrivacyInfo.xcprivacy @@ -0,0 +1,14 @@ + + + + + NSPrivacyTracking + + NSPrivacyTrackingDomains + + NSPrivacyCollectedDataTypes + + NSPrivacyAccessedAPITypes + + + From 7d9ad32650322f78ba9b880ead75023c5737f37b Mon Sep 17 00:00:00 2001 From: hitsubunnu Date: Sun, 21 Dec 2025 16:29:56 +0900 Subject: [PATCH 2/6] Fix CI: remove hardcoded iOS version from simulator destination MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 889907f..784ea13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: macOS-latest strategy: matrix: - destination: ['platform=iOS Simulator,OS=18.0,name=iPhone 16 Pro Max'] + destination: ['platform=iOS Simulator,name=iPhone 16 Pro Max'] steps: - name: Checkout From 2cf7ac3cbf8a2a4e5011f4bcafecbe3b88f45b11 Mon Sep 17 00:00:00 2001 From: hitsubunnu Date: Sun, 21 Dec 2025 16:35:25 +0900 Subject: [PATCH 3/6] Improve CI workflow configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .github/workflows/ci.yml | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 784ea13..8ae30fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,19 +7,29 @@ on: branches: [ master ] jobs: - test: - name: UnitTest - runs-on: macOS-latest - strategy: - matrix: - destination: ['platform=iOS Simulator,name=iPhone 16 Pro Max'] + build: + name: Build + runs-on: macos-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + - name: Build framework + run: xcodebuild build -scheme QRScanner -destination 'generic/platform=iOS' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO + test: + name: Test + runs-on: macos-latest + timeout-minutes: 15 steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Select latest Xcode - run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer + - uses: actions/checkout@v4 - name: Run unit tests - run: xcodebuild test -workspace QRScanner.xcworkspace -scheme UnitTests -destination "${destination}" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO - env: - destination: ${{ matrix.destination }} + run: xcodebuild test -workspace QRScanner.xcworkspace -scheme UnitTests -destination 'platform=iOS Simulator,name=iPhone 15 Pro' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO + + spm: + name: Swift Package Manager + runs-on: macos-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + - name: Build with SPM + run: swift build From ad7c8af0afae3c5603fbd626d260d6385a37efd7 Mon Sep 17 00:00:00 2001 From: hitsubunnu Date: Sun, 21 Dec 2025 16:37:52 +0900 Subject: [PATCH 4/6] Fix SPM build for iOS-only library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .github/workflows/ci.yml | 2 +- Package.swift | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ae30fb..e5706c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,4 +32,4 @@ jobs: steps: - uses: actions/checkout@v4 - name: Build with SPM - run: swift build + run: xcodebuild build -scheme QRScanner -destination 'generic/platform=iOS Simulator' diff --git a/Package.swift b/Package.swift index d9af112..261e300 100644 --- a/Package.swift +++ b/Package.swift @@ -21,6 +21,10 @@ let package = Package( path: "QRScanner", exclude: [ "Info.plist", + "PrivacyInfo.xcprivacy", + ], + resources: [ + .copy("Images.xcassets"), ] ), ] From f5549471bba1e930589ef3993821d9e304a75ad9 Mon Sep 17 00:00:00 2001 From: hitsubunnu Date: Sun, 21 Dec 2025 16:40:46 +0900 Subject: [PATCH 5/6] Fix CI: use iPhone 16 simulator available on GitHub runner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5706c0..ce9178d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Run unit tests - run: xcodebuild test -workspace QRScanner.xcworkspace -scheme UnitTests -destination 'platform=iOS Simulator,name=iPhone 15 Pro' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO + run: xcodebuild test -workspace QRScanner.xcworkspace -scheme UnitTests -destination 'platform=iOS Simulator,name=iPhone 16' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO spm: name: Swift Package Manager From b731d448dd3c85189ae597f3dfce28b58497a9f5 Mon Sep 17 00:00:00 2001 From: hitsubunnu Date: Sun, 21 Dec 2025 16:45:21 +0900 Subject: [PATCH 6/6] Improve Package.swift configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- Package.swift | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Package.swift b/Package.swift index 261e300..87ed9e8 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.3 +// swift-tools-version:5.9 import PackageDescription @@ -13,18 +13,16 @@ let package = Package( targets: ["QRScanner"] ), ], - dependencies: [], targets: [ .target( name: "QRScanner", - dependencies: [], path: "QRScanner", exclude: [ "Info.plist", - "PrivacyInfo.xcprivacy", ], resources: [ - .copy("Images.xcassets"), + .process("Images.xcassets"), + .copy("PrivacyInfo.xcprivacy"), ] ), ]