let device = UIDevice.currentDevice()

        let bundle = NSBundle(identifier: "bundleName")!

        let infoDictionary = bundle.infoDictionary!


        let version= infoDictionary["CFBundleVersion"] as? String

        let shortVersion = infoDictionary["CFBundleShortVersionString"] as? String


參考資料:

http://stackoverflow.com/questions/31290219/get-fi...

http://stackoverflow.com/questions/458632/how-can-...

http://stackoverflow.com/questions/1492351/how-to-...

arrow
arrow
    全站熱搜

    小賢 發表在 痞客邦 留言(0) 人氣()