How to programmatically get iOS's alphanumeric version string

前端 未结 6 641
离开以前
离开以前 2020-12-05 14:20

I\'ve been working with the nice PLCrashReport framework to send to my server the crash reports from my user\'s iOS devices.

However, to symbolicate the crash report

6条回答
  •  独厮守ぢ
    2020-12-05 15:05

    I've reached here looking for an answer to how to do this in Swift and, after some test and error, just found that you can write this, at least in Xcode 9:

    print(ProcessInfo().operatingSystemVersionString)
    

    And the output I get in simulator is:

    Version 11.0 (Build 15A5278f)
    

    And in a real device:

    Version 10.3.2 (Build 14F89)
    

    Hope it helps.

提交回复
热议问题