diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2019-12-05 16:44:47 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2019-12-06 10:34:03 +0100 |
| commit | a7837d5099f2677e67bc7991ecd9d54d202c6c18 (patch) | |
| tree | ffb68abfbff5f38f319d676a08b1f00f651817f2 | |
| parent | e7e70df17f472be16460a2bcea41c5925f537dff (diff) | |
| download | mullvadvpn-a7837d5099f2677e67bc7991ecd9d54d202c6c18.tar.xz mullvadvpn-a7837d5099f2677e67bc7991ecd9d54d202c6c18.zip | |
Add version suffix and display it under Settings
| -rw-r--r-- | ios/MullvadVPN/Bundle+MullvadVersion.swift | 24 | ||||
| -rw-r--r-- | ios/MullvadVPN/Info.plist | 10 | ||||
| -rw-r--r-- | ios/MullvadVPN/SettingsViewController.swift | 3 |
3 files changed, 33 insertions, 4 deletions
diff --git a/ios/MullvadVPN/Bundle+MullvadVersion.swift b/ios/MullvadVPN/Bundle+MullvadVersion.swift new file mode 100644 index 0000000000..0ab1e1da4a --- /dev/null +++ b/ios/MullvadVPN/Bundle+MullvadVersion.swift @@ -0,0 +1,24 @@ +// +// Bundle+MullvadVersion.swift +// MullvadVPN +// +// Created by pronebird on 29/11/2019. +// Copyright © 2019 Amagicom AB. All rights reserved. +// + +import Foundation + +private let kInfoDictionaryMullvadVersionSuffixKey = "MullvadVersionSuffix" + +extension Bundle { + + var mullvadVersion: String? { + let shortVersion = infoDictionary?["CFBundleShortVersionString"] as? String + let versionSuffix = infoDictionary?[kInfoDictionaryMullvadVersionSuffixKey] as? String + + return [shortVersion, versionSuffix] + .compactMap { $0 } + .joined(separator: "-") + } + +} diff --git a/ios/MullvadVPN/Info.plist b/ios/MullvadVPN/Info.plist index 89d7858b37..1b75b96fe1 100644 --- a/ios/MullvadVPN/Info.plist +++ b/ios/MullvadVPN/Info.plist @@ -4,6 +4,8 @@ <dict> <key>CFBundleDevelopmentRegion</key> <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleDisplayName</key> + <string>Mullvad VPN</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> @@ -15,11 +17,15 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>1.0</string> + <string>$(MARKETING_VERSION)</string> <key>CFBundleVersion</key> - <string>1</string> + <string>$(CURRENT_PROJECT_VERSION)</string> + <key>ITSAppUsesNonExemptEncryption</key> + <false/> <key>LSRequiresIPhoneOS</key> <true/> + <key>MullvadVersionSuffix</key> + <string>dev1</string> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> <key>UIMainStoryboardFile</key> diff --git a/ios/MullvadVPN/SettingsViewController.swift b/ios/MullvadVPN/SettingsViewController.swift index 50273c39d9..fe6b11743d 100644 --- a/ios/MullvadVPN/SettingsViewController.swift +++ b/ios/MullvadVPN/SettingsViewController.swift @@ -52,9 +52,8 @@ class SettingsViewController: UITableViewController { let middleSection = StaticTableViewSection() let versionRow = StaticTableViewRow(reuseIdentifier: CellIdentifier.appVersion.rawValue) { (_, cell) in let cell = cell as! SettingsAppVersionCell - let versionString = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String - cell.versionLabel.text = versionString + cell.versionLabel.text = Bundle.main.mullvadVersion } versionRow.isSelectable = false |
