Gate NFC contact code behind @available(iOS 18, *) to fix App Store Connect build errors (#1659)

Agent-Logs-Url: https://github.com/meshtastic/Meshtastic-Apple/sessions/6a66f55f-2b1f-458a-b44a-21882b7ba4f6

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com>
This commit is contained in:
Copilot 2026-04-15 18:32:38 -07:00 committed by GitHub
parent 104cdd58f9
commit 50e52ca0ff
2 changed files with 13 additions and 6 deletions

View file

@ -406,11 +406,13 @@ struct Settings: View {
Image(systemName: "gearshape")
}
}
NavigationLink(value: SettingsNavigationState.tools) {
Label {
Text("Tools")
} icon: {
Image(systemName: "hammer")
if #available(iOS 18, *) {
NavigationLink(value: SettingsNavigationState.tools) {
Label {
Text("Tools")
} icon: {
Image(systemName: "hammer")
}
}
}
NavigationLink(value: SettingsNavigationState.routes) {
@ -581,7 +583,9 @@ struct Settings: View {
case .firmwareUpdates:
Firmware(node: node)
case .tools:
Tools()
if #available(iOS 18, *) {
Tools()
}
case .tak:
TAKServerConfig()
case .takConfig:

View file

@ -12,6 +12,7 @@ import CoreNFC
import MeshtasticProtobufs
import OSLog
@available(iOS 18, *)
struct Tools: View {
@EnvironmentObject var accessoryManager: AccessoryManager
@Environment(\.managedObjectContext) var context
@ -69,6 +70,7 @@ struct Tools: View {
}
}
@available(iOS 18, *)
#Preview {
let context = PersistenceController.preview.container.viewContext
return Tools()
@ -77,6 +79,7 @@ struct Tools: View {
}
#if !targetEnvironment(macCatalyst)
@available(iOS 18, *)
final class NFCReader: NSObject, ObservableObject, NFCNDEFReaderSessionDelegate {
private let logger = Logger(subsystem: "org.meshtastic.app", category: "NFC")