ios - Organizing App Version, iDevice OS & Device -
below great way organize of following information one source:
- app version
- iphone os
- device
i needed information can email them part of apps feedback feature.
let infodict = nsbundle.mainbundle().infodictionary let current = uidevice.currentdevice() let payload = [ "bundleid" : infodict!["cfbundleidentifier"]!, "appversion" : infodict!["cfbundleshortversionstring"]!, "bundleversion" : infodict!["cfbundleversion"]!, "devicename" : current.name, "devicemodel" : current.model, "systemname" : current.systemname, "systemversion" : current.systemversion ] to combine 1 string:
let string = payload.keys.array.reduce("", combine: { (input, key) -> string in return "\(input)\r\n\(key): \(payload[key])" })
Comments
Post a Comment