include TouchscreenKeyboard declaration in all builds

I deploy my project to windows, mac, web, android and ios.

I use TouchScreenKeyboard on ios and android, that section of code is ignored based on SystemInfo.DeviceType on pc, mac and web.

Unity wont let me build to web pc or mac with any touchScreenKeyboard references. Is there a way around this?

The whole point of using Unity is having a single code base for different platforms.

Its a pain having to comment out those sections when Im doing a build…

You can use Conditional compilation against the Unity version
1.

I don’t remember the syntax, but there should be stuff like #if UNITY_ANDROID or something like that.

Edit:
just found the page with all commends: 2.