mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Fix a couple more potential crashes
This commit is contained in:
parent
4467c7ab9e
commit
866d21246e
2 changed files with 2 additions and 2 deletions
|
|
@ -1052,7 +1052,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, ObservableObject {
|
|||
let binaryData: Data = try! toRadio.serializedData()
|
||||
if connectedPeripheral!.peripheral.state == CBPeripheralState.connected {
|
||||
self.connectedPeripheral.peripheral.writeValue(binaryData, for: self.TORADIO_characteristic, type: .withResponse)
|
||||
let logString = String.localizedStringWithFormat(NSLocalizedString("mesh.log.lora.config.sent %@", comment: "Sent a LoRaConfig for: %@"), connectedPeripheral.num)
|
||||
let logString = String.localizedStringWithFormat(NSLocalizedString("mesh.log.lora.config.sent %@", comment: "Sent a LoRaConfig for: %@"), String(connectedPeripheral.num))
|
||||
MeshLogger.log("📻 \(logString)")
|
||||
}
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ struct MeshtasticAppleApp: App {
|
|||
print("URL received \(userActivity)")
|
||||
self.incomingUrl = userActivity.webpageURL
|
||||
|
||||
if self.incomingUrl!.absoluteString.lowercased().contains("meshtastic.org/e/#") {
|
||||
if ((self.incomingUrl?.absoluteString.lowercased().contains("meshtastic.org/e/#")) != nil) {
|
||||
|
||||
if let components = self.incomingUrl?.absoluteString.components(separatedBy: "#") {
|
||||
self.channelSettings = components.last!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue