Skip to content

Commit 2fec9cb

Browse files
Improved Apple Silicon detection
1 parent 6c0cabb commit 2fec9cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/SwiftCPUDetect/SwiftCPUDetect.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public enum CpuArchitecture: String, Codable, Equatable, CaseIterable{
9393
let mode = AppExecutionMode.current()
9494

9595
if arch == .intel64 && mode == .emulated{
96-
return arm64e
96+
return arm64
9797
}
9898

9999
if arch.isPPC() && mode == .emulated{
@@ -121,7 +121,7 @@ public enum CpuArchitecture: String, Codable, Equatable, CaseIterable{
121121

122122
///Gets if the current istance is an Apple Silicon cpu
123123
public func isAppleSilicon() -> Bool{
124-
return self == .arm64e
124+
return self == .arm64e || self == .arm64
125125
}
126126

127127
///Gets if the current istance is an Arm cpu

0 commit comments

Comments
 (0)