- Add Apple Sign-In backend (JWKS verification, account linking, session management) - Implement push notification deep linking with NotificationDeepLinkRouter - Add jailbreak detection, runtime integrity monitoring, secure enclave service - Implement OAuth social login, token refresh, and secure logout flows - Add image caching (memory/disk), optimizer, upload queue, async semaphore - Implement notification analytics, type preferences, and category setup - Expand UI test suite with UITestBase, accessibility, auth flow, performance tests - Add CI pipeline for iOS UI tests (3 device sizes) and performance benchmarks - Restructure Xcode project to manual groups with KordantWidgets target - Add SwiftLint, Swift Collections/Algorithms/GoogleSignIn dependencies - Update project.yml for XcodeGen with new targets and configurations
35 lines
1.2 KiB
Swift
35 lines
1.2 KiB
Swift
import CallKit
|
|
import Foundation
|
|
|
|
class SpamCallDirectoryProvider: CXCallDirectoryProvider {
|
|
|
|
override func beginRequest(with context: CXCallDirectoryExtensionContext) {
|
|
// The extension should call context.completeRequest() when it's finished.
|
|
|
|
// 1. Load data from shared App Group
|
|
let service = SpamDirectoryService.shared
|
|
|
|
do {
|
|
// 2. Add blocked numbers
|
|
let blockedNumbers = try service.loadBlockedNumbers()
|
|
for number in blockedNumbers {
|
|
context.addBlockingEntry(withNextSequentialPhoneNumber: number)
|
|
}
|
|
|
|
// 3. Add identified numbers
|
|
let identifiedEntries = try service.loadIdentifiedEntries()
|
|
for entry in identifiedEntries {
|
|
context.addIdentificationEntry(withNextSequentialPhoneNumber: entry.number, label: entry.label)
|
|
}
|
|
|
|
// 4. Complete the request
|
|
context.completeRequest()
|
|
|
|
} catch {
|
|
// In case of error, we still complete the request but log it
|
|
// (In a real app, use OSLog)
|
|
context.completeRequest()
|
|
}
|
|
}
|
|
}
|