rubymotion-community / BubbleWrap

Cocoa wrappers and helpers for RubyMotion (Ruby for iOS and OS X) - Making Cocoa APIs more Ruby like, one API at a time. Fork away and send your pull requests
Other
1.18k stars 208 forks source link

UIDevice.simulator? doesn't return true when running in simulator #473

Closed abaroody closed 4 years ago

abaroody commented 8 years ago

As far as I can tell UIDevice.simulator? no longer returns true when running in the simulator. The method uses UIDevice.currentDevice.model which now returns only "iPhone" for me instead of "iPhone Simulator." Does anyone else have this issue?

markrickert commented 8 years ago

Here's how we solved it in RMQ - https://github.com/infinitered/rmq/pull/296/files

I'd welcome a pull request with this fix in it.

holgersindbaek commented 8 years ago

I just installed the latest build. Now "Device.simulator?" returns true when running in simulator, but it also returns true when running on device!

holgersindbaek commented 8 years ago

This pull request should fix it:

https://github.com/rubymotion/BubbleWrap/pull/476