Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check if app runs on Simulator

How can I check if a WinRT app runs inside the simulator?

For Windows Phone I use following piece of code:

    Boolean isOnEmulator 
            = (Microsoft.Devices.Environment.DeviceType == DeviceType.Emulator);

But I cannot find the solution fot WinRT.

like image 889
Igor Avatar asked Mar 26 '13 09:03

Igor


People also ask

Can I test IAP in simulator?

You can either add new IAP under same group, or create new group, or even delete the existing one. The final step now is making this configuration file is available for testing in the simulator. What you need to do is using the storekit in our debug options in our scheme. Let's try running our application.

How do I turn off simulator on iPhone?

Yes. Press Command + Q to quit the simulator. This will close all the apps running in the simulator. Pressing the home button only returns to the home screen without quitting the apps(ios 4 or later) because of multitasking.

How do you run your app in iOS simulator?

To run your app in Simulator, choose an iOS simulator—for example, iPhone 6 Plus, iPad Air, or iPhone 6 + Apple Watch - 38mm—from the Xcode scheme pop-up menu and click Run. Xcode builds your project and then launches the most recent version of your app running in Simulator on your Mac screen, as shown in Figure 1-1.


1 Answers

You could try something like this:

bool isRemote = Windows.System.RemoteDesktop.InteractiveSession.IsRemote;

it will return true if it is on Simulator else false.

like image 59
Maulik Shah Avatar answered Oct 22 '22 21:10

Maulik Shah