2017-02-11 103 views

回答

3

你可以從ProcessInfo類這樣的信息:

if let simulatorName = ProcessInfo.processInfo.environment["SIMULATOR_DEVICE_NAME"] { 
    print("Running on \(simulatorName) simulator") 
} else { 
    print("Running on device") 
} 
相關問題