-
Notifications
You must be signed in to change notification settings - Fork 451
Open
Description
I'm not sure if this is a bug or intended, but thought I'd raise it for awareness.
I'm running on the 2026 beta 1, so this may resolve in time anyway.
/// Returns whether the device is an iPhone (real or simulator)
public var isPhone: Bool {
return (isOneOf(Device.allPhones)
|| isOneOf(Device.allSimulatorPhones)
|| (UIDevice.current.userInterfaceIdiom == .phone && isCurrent)) && !isPod
}
(lldb) po Device.current
iPad Mini (A17 Pro)
(lldb) po Device.current.isPhone
true
(lldb) po isOneOf(Device.allPhones)
false
(lldb) po isOneOf(Device.allSimulatorPhones)
false
(lldb) po UIDevice.current.userInterfaceIdiom == .phone
true
Metadata
Metadata
Assignees
Labels
No labels