Is it possible to suppress the native alert that the “Pasteboard plugin is not supported on the Simulator”? Every time I launch my project in the simulator I get this and don’t need to see it anymore.
Thank you.
Ed
Is it possible to suppress the native alert that the “Pasteboard plugin is not supported on the Simulator”? Every time I launch my project in the simulator I get this and don’t need to see it anymore.
Thank you.
Ed
You can do this:
local pasteboard = require( "plugin.pasteboard" ) -- Add this after require to suppress alert if "simulator" == system.getInfo("environment") then for k,v in pairs(pasteboard) do if type(v)=="function" then pasteboard[k]=function() end end end end
Works great!
So this just replaces the function with an empty function? Brilliant!
Thank you!
Ed
Hi Ed
Yes it just replaces all the functions in the plugin with empty functions.
You are welcome. Jacob
You can do this:
local pasteboard = require( "plugin.pasteboard" ) -- Add this after require to suppress alert if "simulator" == system.getInfo("environment") then for k,v in pairs(pasteboard) do if type(v)=="function" then pasteboard[k]=function() end end end end
Works great!
So this just replaces the function with an empty function? Brilliant!
Thank you!
Ed
Hi Ed
Yes it just replaces all the functions in the plugin with empty functions.
You are welcome. Jacob