diff --git a/NearbyShare/Connection/NearbyConnectionManager.swift b/NearbyShare/Connection/NearbyConnectionManager.swift index 560e13d..bd2a21d 100644 --- a/NearbyShare/Connection/NearbyConnectionManager.swift +++ b/NearbyShare/Connection/NearbyConnectionManager.swift @@ -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)) diff --git a/NearbyShare/Model/DataModel.swift b/NearbyShare/Model/DataModel.swift index 5677b54..aa2f9f5 100644 --- a/NearbyShare/Model/DataModel.swift +++ b/NearbyShare/Model/DataModel.swift @@ -94,10 +94,20 @@ public struct RemoteDeviceInfo: Codable, Identifiable, Equatable { switch type { case .computer: return "laptopcomputer" + case .tablet: + return "ipad.landscape" default: - return "smartphone" + return getSmartphoneIcon() } } + + + private func getSmartphoneIcon() -> String { + if #available(iOS 17.0, macOS 14.0, *) { + return "smartphone" + } + return "iphone" + } } diff --git a/QuickDrop/Localizable.xcstrings b/QuickDrop/Localizable.xcstrings index a8c0f4f..2881805 100644 --- a/QuickDrop/Localizable.xcstrings +++ b/QuickDrop/Localizable.xcstrings @@ -226,7 +226,7 @@ "de" : { "stringUnit" : { "state" : "translated", - "value" : "Immer annehmen" + "value" : "Immer akzeptieren" } }, "en" : {