From d57ed6802a061b1a219c310b9d175cc60cfba05b Mon Sep 17 00:00:00 2001 From: Oliver Ziegler Date: Sat, 15 Oct 2016 13:13:54 +0200 Subject: [PATCH] Update check for iOS simulator --- Source/Armchair.swift | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Armchair.swift b/Source/Armchair.swift index bce2f22..153140b 100644 --- a/Source/Armchair.swift +++ b/Source/Armchair.swift @@ -1395,14 +1395,16 @@ public class Manager : ArmchairManager { UIApplication.sharedApplication().openURL(url) } } - - if UIDevice.currentDevice().model.rangeOfString("Simulator") != nil { + + // Check for iOS simulator + #if arch(i386) || arch(x86_64) debugLog("iTunes App Store is not supported on the iOS simulator.") debugLog(" - We would have went to \(reviewURLString()).") debugLog(" - Try running on a test-device") let fakeURL = reviewURLString().stringByReplacingOccurrencesOfString("itms-apps", withString:"http") debugLog(" - Or try copy/pasting \(fakeURL) into a browser on your computer.") - } + #endif + #elseif os(OSX) if let url = NSURL(string: reviewURLString()) { let opened = NSWorkspace.sharedWorkspace().openURL(url)