[Implemented] CompilerIf check Android/iOS/Web

Got an idea for enhancing SpiderBasic? New command(s) you'd like to see?
hoerbie
Posts: 96
Joined: Sun Mar 17, 2019 5:51 pm
Location: DE/BY/MUC

[Implemented] CompilerIf check Android/iOS/Web

Post by hoerbie »

Hi,

don't know if I have overlooked it in the docs, but I didn't find any "CompilerIf" check to switch between commands for Android, iOS and Web.

I've programmed an app for Android and iOS, and I need to include different Cordova extensions for Android and iOS to use bluetooth printer.
I've tried to use a simple "If" checking against "DeviceInfo(#PB_Device_Platform)", that shows "Android" or "iOS" but this doesn't work, when using the

Code: Select all

Import "cordova plugin add ..."
For me it looks, like Import is always executed when compiling with Cordova?

Thanks, hoerbie