Showing App's Build Date

后端 未结 6 879
情书的邮戳
情书的邮戳 2021-02-04 05:23

I am able to display the build date for my app in the simulator, but whenever I archive the app, and upload it to TestFlight, and then install it on a device, the build date doe

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-04 05:48

    Swift5

    let compileDate = String(Date())
    let df = DateFormatter()
    df.dateFormat = "MMM-dd-yyyy"
    let usLocale = NSLocale(localeIdentifier: "en_US")
    df.locale = usLocale
    let aDate: Date? = df.date(from: compileDate)
    

提交回复
热议问题