Browse Source

Merge pull request #321 from deltachat/add-version

add version to X-Mailer header
björn petersen 5 years ago
parent
commit
c13a3517f7
1 changed files with 6 additions and 1 deletions
  1. 6 1
      deltachat-ios/DC/Wrapper.swift

+ 6 - 1
deltachat-ios/DC/Wrapper.swift

@@ -6,7 +6,12 @@ class DcContext {
     let contextPointer: OpaquePointer?
     let contextPointer: OpaquePointer?
 
 
     init() {
     init() {
-        contextPointer = dc_context_new(callback_ios, nil, "iOS")
+        var version = ""
+        if let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {
+            version += " " + appVersion
+        }
+
+        contextPointer = dc_context_new(callback_ios, nil, "iOS" + version)
     }
     }
 
 
     deinit {
     deinit {