Determine if iOS device is 32- or 64-bit

前端 未结 7 522
清歌不尽
清歌不尽 2020-12-01 04:03

Does anyone know of an easy way to tell if an iOS7 device has 32- or 64-bit hardware? I don\'t mean programmatically, I just mean via settings, model number, 3rd-party app,

相关标签:
7条回答
  • 2020-12-01 04:30

    You can use bitWidth on Int https://developer.apple.com/documentation/swift/int/2885648-bitwidth

    static var is32Bit: Bool {
        return Int.bitWidth == 32
    }
    
    static var is64Bit: Bool {
        return Int.bitWidth == 64
    }
    
    0 讨论(0)
提交回复
热议问题