mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Fix for macCatalyst code trying to build for iOS
This commit is contained in:
parent
c9c06f1167
commit
7b0a5c80f3
1 changed files with 15 additions and 11 deletions
|
|
@ -171,17 +171,21 @@ struct ESP32OTAIntroSheet: View {
|
|||
}
|
||||
|
||||
private var OTAMode: SupportedOTAMode {
|
||||
if let connection = accessoryManager.activeConnection?.connection {
|
||||
if connection is TCPConnection {
|
||||
return .wifi
|
||||
} else if connection is BLEConnection {
|
||||
return .ble
|
||||
} else if connection is SerialConnection {
|
||||
return .wifi //DEBUG
|
||||
}
|
||||
|
||||
guard let connection = accessoryManager.activeConnection?.connection else {
|
||||
return .none
|
||||
}
|
||||
return .none
|
||||
}
|
||||
|
||||
switch connection {
|
||||
case is TCPConnection:
|
||||
return .wifi
|
||||
case is BLEConnection:
|
||||
return .ble
|
||||
#if targetEnvironment(macCatalyst)
|
||||
case is SerialConnection:
|
||||
return .wifi // DEBUG
|
||||
#endif
|
||||
default:
|
||||
return .none
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue