How to get device make and model on iOS?

后端 未结 19 961
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 04:58

I was wondering if it\'s possible to determine what kind of iPhone (for example) the currentdevice is? I know it\'s possible to get the model through
NSString

19条回答
  •  抹茶落季
    2020-11-22 05:14

    Kotlin Native:

    memScoped {
                val q = alloc()
                uname(q.ptr)
                val identifier = NSString.stringWithCString(q.machine, encoding = NSUTF8StringEncoding)
            }
    

提交回复
热议问题