From d7d3eec2e53e626b3bf08206e5393d35363fea04 Mon Sep 17 00:00:00 2001 From: Daniil Klimov Date: Mon, 6 Apr 2026 14:12:43 +0300 Subject: [PATCH] fix: missing try on makeRequest, remove HealthKit capability from project.yml - Add missing try to makeRequest call on retry path (line 54) - Remove HealthKit from xcodegen capabilities (adds Verifiable Health Records which personal teams don't support). HealthKit works via entitlements file. Co-Authored-By: Claude Opus 4.6 (1M context) --- PulseHealth/Services/APIService.swift | 2 +- project.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/PulseHealth/Services/APIService.swift b/PulseHealth/Services/APIService.swift index 53eb772..eeb076e 100644 --- a/PulseHealth/Services/APIService.swift +++ b/PulseHealth/Services/APIService.swift @@ -51,7 +51,7 @@ class APIService { guard !newToken.isEmpty else { throw APIError.unauthorized } await MainActor.run { auth.updateTokens(accessToken: newToken, refreshToken: refreshResp.refreshToken) } // Retry original request with new token - let retryReq = makeRequest(path, method: method, token: newToken, body: body) + let retryReq = try makeRequest(path, method: method, token: newToken, body: body) let (retryData, retryResp) = try await URLSession.shared.data(for: retryReq) guard let retryHttp = retryResp as? HTTPURLResponse else { throw APIError.networkError("Нет ответа") } if retryHttp.statusCode == 401 { throw APIError.unauthorized } diff --git a/project.yml b/project.yml index f048917..89d497a 100644 --- a/project.yml +++ b/project.yml @@ -20,7 +20,6 @@ targets: DEVELOPMENT_TEAM: V9AG8JTFLC ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon capabilities: - HealthKit: true BackgroundModes: modes: - processing