Skip to content

iPad running iPhone app returns true to isiPhone #447

@lewis-smith

Description

@lewis-smith

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions