From 8e2b7ab80cead4edbfac9c00da2425d0974b8c4a Mon Sep 17 00:00:00 2001 From: Ananovo Date: Wed, 4 Nov 2026 14:48:14 +0800 Subject: [PATCH] fix(ios): unblock Mac Catalyst builds (#2275) * fix(ios): mark attachment localization key manual * fix(ios): guard hinge probe on Mac Catalyst --- ios/Hapi/Features/Home/FoldableDevice.swift | 4 ++++ ios/Hapi/Resources/Localizable.xcstrings | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ios/Hapi/Features/Home/FoldableDevice.swift b/ios/Hapi/Features/Home/FoldableDevice.swift index a1387fbb..f231174e 100644 --- a/ios/Hapi/Features/Home/FoldableDevice.swift +++ b/ios/Hapi/Features/Home/FoldableDevice.swift @@ -22,11 +22,15 @@ struct HingeProbe: UIViewRepresentable { func makeUIView(context: Context) -> UIView { let view = UIView() view.isUserInteractionEnabled = false + #if !targetEnvironment(macCatalyst) + // UIHingeInteraction is unavailable in the Mac Catalyst SDK; hinge + // detection is only meaningful on iPhone and iPad. if #available(iOS 27.1, *) { view.addInteraction(UIHingeInteraction { _, update in if update.hinge != nil { FoldableDevice.shared.recordHinge() } }) } + #endif return view } diff --git a/ios/Hapi/Resources/Localizable.xcstrings b/ios/Hapi/Resources/Localizable.xcstrings index cbc5f8e0..1041ae29 100644 --- a/ios/Hapi/Resources/Localizable.xcstrings +++ b/ios/Hapi/Resources/Localizable.xcstrings @@ -138,7 +138,7 @@ } }, "%@ attachments" : { - + "extractionState" : "manual" }, "%@ is over the 50 MB upload limit" : { "extractionState" : "manual",