Fix icons for iOS 16, add support for showing tablet icon

This commit is contained in:
Leon Böttger committed 2025-08-24 10:50:53 +02:00
1 parent 46c44e800c
commit c59321edd8
3 files changed
+16 -3

No files matched your search

@@ -48,7 +48,10 @@ public class NearbyConnectionManager: NSObject, NetServiceDelegate, InboundNearb
#if os(macOS)
self.deviceInfo = EndpointInfo(name: Host.current().localizedName ?? "Mac", deviceType: .computer)
#else
self.deviceInfo = EndpointInfo(name: UIDevice.current.marketingName.withoutBracketedContent, deviceType: .phone)
let marketingName = UIDevice.current.marketingName.withoutBracketedContent
let isiPad = UIDevice.current.model == "iPad"
self.deviceInfo = EndpointInfo(name: marketingName, deviceType: isiPad ? .tablet : .phone)
#endif
tcpListener = try! NWListener(using: NWParameters(tls: .none))