Remove WARNING from console

Hello,
I’m constantly having following warning in the Simulator and would like to remove it if possible.
WARNING: Runtime:addEventListener: real ios devices don’t generate ‘key’ events

The code looks like this:

if Runtime:hasEventSource( "key" ) then Runtime:addEventListener( "key", onKeyEvent ) end

Since I need to add and remove the eventListener again and again over time, I see this warning constantly.
Would be great if there’s a way to prevent that.

Thanks

In the simulator change the device to something that isn’t an iOS device. I usually use the FireTV devices since I know those have key events. There might be others you can use. Check out the apple TV ones they might also work.

Simply change to a non iOS skin and the warning will go away. 

Rob

I do this…

if not(system.getInfo("platform") == "ios") then Runtime:addEventListener("key", onKeyEvent) end

So simple… thanks guys!

In the simulator change the device to something that isn’t an iOS device. I usually use the FireTV devices since I know those have key events. There might be others you can use. Check out the apple TV ones they might also work.

Simply change to a non iOS skin and the warning will go away. 

Rob

I do this…

if not(system.getInfo("platform") == "ios") then Runtime:addEventListener("key", onKeyEvent) end

So simple… thanks guys!