fix: harden ios app build hygiene

This commit is contained in:
Peter Steinberger
2026-04-28 01:41:59 +01:00
parent 2fe213ebf2
commit b294f7c467
97 changed files with 1150 additions and 1044 deletions

View File

@@ -59,58 +59,57 @@ struct GatewayProblemBanner: View {
.padding(14)
.background(
.thinMaterial,
in: RoundedRectangle(cornerRadius: 16, style: .continuous)
)
in: RoundedRectangle(cornerRadius: 16, style: .continuous))
}
private var iconName: String {
switch self.problem.kind {
case .pairingRequired,
.pairingRoleUpgradeRequired,
.pairingScopeUpgradeRequired,
.pairingMetadataUpgradeRequired:
return "person.crop.circle.badge.clock"
.pairingRoleUpgradeRequired,
.pairingScopeUpgradeRequired,
.pairingMetadataUpgradeRequired:
"person.crop.circle.badge.clock"
case .timeout, .connectionRefused, .reachabilityFailed, .websocketCancelled:
return "wifi.exclamationmark"
"wifi.exclamationmark"
case .deviceIdentityRequired,
.deviceSignatureExpired,
.deviceNonceRequired,
.deviceNonceMismatch,
.deviceSignatureInvalid,
.devicePublicKeyInvalid,
.deviceIdMismatch:
return "lock.shield"
.deviceSignatureExpired,
.deviceNonceRequired,
.deviceNonceMismatch,
.deviceSignatureInvalid,
.devicePublicKeyInvalid,
.deviceIdMismatch:
"lock.shield"
default:
return "exclamationmark.triangle.fill"
"exclamationmark.triangle.fill"
}
}
private var tint: Color {
switch self.problem.kind {
case .pairingRequired,
.pairingRoleUpgradeRequired,
.pairingScopeUpgradeRequired,
.pairingMetadataUpgradeRequired:
return .orange
.pairingRoleUpgradeRequired,
.pairingScopeUpgradeRequired,
.pairingMetadataUpgradeRequired:
.orange
case .timeout, .connectionRefused, .reachabilityFailed, .websocketCancelled:
return .yellow
.yellow
default:
return .red
.red
}
}
private var ownerLabel: String {
switch self.problem.owner {
case .gateway:
return "Fix on gateway"
"Fix on gateway"
case .iphone:
return "Fix on iPhone"
"Fix on iPhone"
case .both:
return "Check both"
"Check both"
case .network:
return "Check network"
"Check network"
case .unknown:
return "Needs attention"
"Needs attention"
}
}
}
@@ -218,15 +217,15 @@ struct GatewayProblemDetailsSheet: View {
private var ownerSummary: String {
switch self.problem.owner {
case .gateway:
return "Primary fix: gateway"
"Primary fix: gateway"
case .iphone:
return "Primary fix: this iPhone"
"Primary fix: this iPhone"
case .both:
return "Primary fix: check both this iPhone and the gateway"
"Primary fix: check both this iPhone and the gateway"
case .network:
return "Primary fix: network or remote access"
"Primary fix: network or remote access"
case .unknown:
return "Primary fix: review details and retry"
"Primary fix: review details and retry"
}
}
}