How to get your own app version from xcode?

前端 未结 4 1945
隐瞒了意图╮
隐瞒了意图╮ 2021-01-31 15:30

I wonder if there is a way to get your own app version in code after you put it in the \"Summary\" tab in xCode. One way seems to be to search Info.plist for

4条回答
  •  暖寄归人
    2021-01-31 15:53

    For Swift:

    Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString")
    

提交回复
热议问题