swift 判断真机还是模拟器
if Platform.isSimulator { // Do one thing print("isSimulator") } else { } struct Platform { static let isSimulator: Bool = { var isSim = false #if arch(i386) || arch(x86_64) isSim = true #endif return isSim }() }
posted on 2018-02-01 13:39 JieFangZhe 阅读(494) 评论(0) 收藏 举报
浙公网安备 33010602011771号