Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
## Master
## Main

##### Enhancements

* None

##### Bug Fixes

* None
* Fix debug symbol not showing in `verboseVersionString` method.
[Earl Gaspard](https://github.com/earlgaspard)
[#121](https://github.com/BottleRocketStudios/iOS-UtiliKit/pull/121)


## 1.8.0 (2022-01-19)
Expand All @@ -29,6 +31,7 @@

* None


## 1.7.0 (2020-08-17)

##### Enhancements
Expand Down Expand Up @@ -78,6 +81,7 @@
[Dimitar Milinski](https://github.com/dmilinski)
[#81](https://github.com/BottleRocketStudios/iOS-UtiliKit/pull/81)


## 1.6.0 (2019-08-29)

##### Enhancements
Expand Down
9 changes: 5 additions & 4 deletions Sources/Version/Bundle+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public extension Bundle {
}

/**
Returns the verbose version number of the application. EX. version 5.0.1.123DE🐞 Debug
Returns the verbose version number of the application. EX. version 5.0.1.123 DE 🐞 Debug

Short Version EX. version 5.0.1DE🐞 Debug
Short Version EX. version 5.0.1 DE 🐞 Debug

- Parameter configuration: Defaults to the standard config. This struct defines the keys used for fetching the version number
- Parameter isShortVersion: A Bool value used to switch between the short and long version
Expand All @@ -47,9 +47,10 @@ public extension Bundle {

let version = try versionString(for: configuration, isShortVersion: isShortVersion)
let environment = configuration.environmentName ?? ""

let debugSymbol = showDebugSymbol ? " 🐞 Debug" : ""

let localizedVersionString = NSLocalizedString("version %@", comment: "Version string - %@ will be replaced with a version number. EX. 5.0.1")
let formatString = String.localizedStringWithFormat(localizedVersionString, "\(version) \(environment)")
let formatString = String.localizedStringWithFormat(localizedVersionString, "\(version) \(environment)\(debugSymbol)")

return formatString
}
Expand Down