Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add isSimulator for iOS & Android device #35

Merged

Conversation

AndyChenW
Copy link
Contributor

@purplecabbage change pr and property name to isSimulator.

@TimBarham
Copy link

Should this be "Emulator" rather than "Simulator" (that's the terminology used elsewhere in Cordova, isn't it? And the typical terminology for Android and Windows at least)?

@purplecabbage
Copy link
Contributor

Attempting to avoid a semantics argument, I chose to overlook this.
do we really need to add 2 properties? iOS simulator IS a simulator.

@purplecabbage
Copy link
Contributor

2 other 'offers'
device.isVirtual
Or the opposite
device.isDevice

@TimBarham
Copy link

Heh, I wasn't wanting to start a semantics argument, just after consistency.

My understanding is that the usual terminology is "simulator" for iOS and "emulator" for Android and Windows. But we don't want to have two properties or different properties for different platforms.

My point was all about being internally consistent: our command to run an app on an emulator/simulator is cordova emulate, so to be internally consistent I'd expect the property to be isEmulator rather than isSimulator.

@purplecabbage
Copy link
Contributor

Ah, gotcha.
I actually think I like isVirtual better as it sidesteps all the sim/emu discussions.
I'll let this pr sit for a bit and see if we get any more opinions.

@AndyChenW
Copy link
Contributor Author

device.isVirtual +1

@purplecabbage
Copy link
Contributor

Created an issue for this here: CB-9847
Moving forward with isVirtual

@TimBarham
Copy link

Works for me.

@asfgit asfgit merged commit 50abd1a into apache:master Oct 22, 2015
@nikhilkh
Copy link
Contributor

@alsorokin Isn't this what you needed for disabling failing tests on iOS simulator?

@alsorokin
Copy link
Contributor

@nikhilkh this is essentially what I needed so I will use this to pend unsupported tests on iOS simulator
I guess this will add a cordova-plugin-device dependency to test plugin though

@purplecabbage
Copy link
Contributor

Yes. Except it is only useful for plugins that depends on device. Accelerometer should not depend on device. I would like to move this directly into platforms, another discussion...

@alsorokin
Copy link
Contributor

@purplecabbage what if we add device dependency not to accelerometer plugin itself but to tests/plugin.xml ?

@purplecabbage
Copy link
Contributor

Love it!
Shockingly, @stevengill and I had this idea also.

@stevengill
Copy link
Contributor

Haha we were just chatting about this yesterday. Makes most sense to add the dependency to tests/plugin.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants