Skip to content

Commit

Permalink
Merge pull request #91 from Nirma/fix/simulator_detection
Browse files Browse the repository at this point in the history
Update  to use targentEnv instead of older swift 3 method.
  • Loading branch information
Nirma committed Sep 20, 2023
2 parents 51c1070 + 5a4ee49 commit 02d23ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/DeviceFamily.swift
Expand Up @@ -46,7 +46,7 @@ public enum DeviceFamily: String {

extension DeviceFamily {
public var isSimulator: Bool {
#if arch(i386) || arch(x86_64)
#if targetEnvironment(simulator)
return true
#else
return false
Expand Down
2 changes: 1 addition & 1 deletion Sources/UIDeviceExtensions.swift
Expand Up @@ -36,7 +36,7 @@ public extension UIDeviceComplete where Base == UIDevice {
return identifier.flatMap { $0.type } ?? .unknown
}

/// Specific model i.e iphone7 or iPhone7s
/// Get specific model name i.e `iPhone 15 Pro`
var deviceModel: DeviceModel {
return identifier.flatMap { DeviceModel(identifier: $0) } ?? .unknown
}
Expand Down

0 comments on commit 02d23ec

Please sign in to comment.