ios - Organizing App Version, iDevice OS & Device -


below great way organize of following information one source:

  1. app version
  2. iphone os
  3. 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

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -