Files
openclaw/apps/shared/OpenClawKit/Sources/OpenClawKit/NetworkInterfaces.swift
Peter Steinberger 091584b197 chore(swift): restore compact conditional bodies (#103832)
* style(swift): restore compact conditional bodies

* fix(ios): remove redundant startup timeout await

* chore(swift): sync native i18n inventory
2026-07-10 18:12:00 +01:00

18 lines
428 B
Swift

import Foundation
public enum NetworkInterfaces {
public static func primaryIPv4Address() -> String? {
var fallback: String?
var en0: String?
for entry in NetworkInterfaceIPv4.addresses() {
if entry.name == "en0" {
en0 = entry.ip
break
}
if fallback == nil { fallback = entry.ip }
}
return en0 ?? fallback
}
}