fix(apple): realign UI layer with regenerated core bindings

- map the new VnidropError cases (DeviceUnavailable, OfferTimeout,
  RelayPolicyIncompatible, ProtocolIncompatible) to existing catalog keys
- drop the stale .map(\.share) now that sharePickedFiles returns Share
- remove the duplicate .transfersChanged pattern in the signal switch
- replace the deprecated String(cString:) sysctl decode
- close the CoreGateway protocol declaration
This commit is contained in:
2026-08-12 11:34:49 +02:00
parent ebdff3df4b
commit dac8232324
5 changed files with 12 additions and 4 deletions

View File

@@ -42,9 +42,10 @@ private struct MacDeviceInfoProvider: DeviceInfoProvider {
var size = 0
sysctlbyname("hw.model", nil, &size, nil, 0)
guard size > 0 else { return nil }
var model = [CChar](repeating: 0, count: size)
var model = [UInt8](repeating: 0, count: size)
sysctlbyname("hw.model", &model, &size, nil, 0)
return String(cString: model)
// sysctl reports a NUL-terminated C string; drop the terminator(s).
return String(decoding: model.prefix(while: { $0 != 0 }), as: UTF8.self)
}
}
#endif