Skip to content

Commit

Permalink
fix: fix device model for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
Alyssa.Yu authored and Alyssa.Yu committed Nov 23, 2022
1 parent e781efb commit 093942b
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Sources/Amplitude/Plugins/Vendors/AppUtil.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ import Foundation
return platform
}

override var requiredPlugin: Plugin {
return IOSLifecycleMonitor()
}

private func deviceModel() -> String {
let platform = self.platform
return getDeviceModel(platform: platform)
}

override var requiredPlugin: Plugin {
return IOSLifecycleMonitor()
}
}
#endif

Expand Down Expand Up @@ -93,7 +93,7 @@ import Foundation
return MacOSLifecycleMonitor()
}

private func deviceModel() -> String {
override var platform: String {
var systemInfo = utsname()
uname(&systemInfo)
let machineMirror = Mirror(reflecting: systemInfo.machine)
Expand All @@ -104,6 +104,11 @@ import Foundation
return identifier
}

private func deviceModel() -> String {
let platform = self.platform
return getDeviceModel(platform: platform)
}

private func macAddress(bsd : String) -> String? {
let MAC_ADDRESS_LENGTH = 6
let separator = ":"
Expand Down

0 comments on commit 093942b

Please sign in to comment.