Skip to content

Commit

Permalink
Make app version number a string instead of an int since semver cant …
Browse files Browse the repository at this point in the history
…be coerced to an int like 1.0 could
  • Loading branch information
robbiet480 committed Apr 16, 2017
1 parent 71dec00 commit 7d051f3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion HomeAssistant/Classes/IdentifyRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ObjectMapper
class IdentifyRequest: Mappable {
var AppBuildNumber: Int?
var AppBundleIdentifer: String?
var AppVersionNumber: Double?
var AppVersionNumber: String?
var DeviceID: String?
var DeviceLocalizedModel: String?
var DeviceModel: String?
Expand Down
2 changes: 1 addition & 1 deletion HomeAssistant/Classes/PushRegistrationRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ObjectMapper
class PushRegistrationRequest: Mappable {
var AppBuildNumber: Int?
var AppBundleIdentifer: String?
var AppVersionNumber: Double?
var AppVersionNumber: String?
var DeviceID: String?
var DeviceLocalizedModel: String?
var DeviceModel: String?
Expand Down
2 changes: 1 addition & 1 deletion HomeAssistant/Classes/PushRegistrationResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class PushRegistrationResponse: Mappable {
var APNSSandbox: Bool?
var AppBuildNumber: Int?
var AppBundleIdentifer: String?
var AppVersionNumber: Int?
var AppVersionNumber: String?
var DeviceId: String?
var DeviceName: String?
var DevicePermanentID: String?
Expand Down
6 changes: 3 additions & 3 deletions HomeAssistant/HAAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ public class HomeAssistantAPI {
}
if let versionNumber = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") {
if let stringedVersionNumber = versionNumber as? String {
ident.AppVersionNumber = Double(stringedVersionNumber)
ident.AppVersionNumber = stringedVersionNumber
}
}
ident.AppBundleIdentifer = Bundle.main.bundleIdentifier
Expand Down Expand Up @@ -715,7 +715,7 @@ public class HomeAssistantAPI {
}
if let versionNumber = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") {
if let stringedVersionNumber = versionNumber as? String {
ident.AppVersionNumber = Double(stringedVersionNumber)
ident.AppVersionNumber = stringedVersionNumber
}
}
if let isSandboxed = Bundle.main.object(forInfoDictionaryKey: "IS_SANDBOXED") {
Expand Down Expand Up @@ -757,7 +757,7 @@ public class HomeAssistantAPI {
}
if let versionNumber = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") {
if let stringedVersionNumber = versionNumber as? String {
ident.AppVersionNumber = Double(stringedVersionNumber)
ident.AppVersionNumber = stringedVersionNumber
}
}
ident.AppBundleIdentifer = Bundle.main.bundleIdentifier
Expand Down

0 comments on commit 7d051f3

Please sign in to comment.