Determine if iOS device is 32- or 64-bit

前端 未结 7 565
清歌不尽
清歌不尽 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:12

    I use this in swift 4, not sure if it's the best solution but it works.

       func getCPUArch()
       {
          #if arch(arm)
             print("this is a 32bit system")
          #elseif arch(arm64)
              print("this is a 64bit system")
          #endif
       }
    

提交回复
热议问题