feat: add FileBookmarkService, BiometricAuthService, ClipboardService

Phase 3 (Tasks 10-11) app services: FileBookmarkService persists a
security-scoped bookmark for the KDBX file in the shared App Group;
BiometricAuthService wraps LAContext for Face ID/Touch ID; ClipboardService
copies text with an expiring clipboard entry on iOS/macOS.

Also fixes a real build issue found while verifying: the AutoFill
extension (iOS-only) was being embedded/signed unconditionally,
breaking macOS builds of the MyPass scheme with a bogus provisioning
error. Added platformFilters = (ios) to both the embed build file and
the target dependency so macOS builds skip it. Verified both iOS
Simulator and macOS builds now fail only on the known, expected
ContentView.swift/Item SwiftData breakage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WYqycDFsynHH9VnnK7LNSf
This commit is contained in:
2026-09-19 15:52:16 +02:00
co-authored by Claude Sonnet 5
parent ac787a0c9e
commit ef52cb9804
4 changed files with 115 additions and 1 deletions
+30
View File
@@ -0,0 +1,30 @@
//
// ClipboardService.swift
// MyPass
//
import Foundation
#if os(iOS)
import UIKit
#else
import AppKit
#endif
public enum ClipboardService {
public static func copy(_ text: String, expiresAfter seconds: TimeInterval = 30) {
#if os(iOS)
UIPasteboard.general.setItems(
[[UIPasteboard.typeAutomatic: text]],
options: [.expirationDate: Date().addingTimeInterval(seconds)]
)
#else
let pb = NSPasteboard.general
pb.clearContents()
pb.setString(text, forType: .string)
let captured = text
DispatchQueue.main.asyncAfter(deadline: .now() + seconds) {
if pb.string(forType: .string) == captured { pb.clearContents() }
}
#endif
}
}