iOS Question Code a sub for b4i or b4a in a b4x app.

grant1842

Active Member
Licensed User
Longtime User
In b4a i can do

toastMessage("android.")

in b4i i can use HUD

toastmessage("ios")

I am working on a cross platform app.

So is there a way to

Example

If
b4i
then
Toastmessage("b4i")
else
if b4a
Toastmessage("b4a")
Is there any documentation for this.
I hope my question makes sense.
Thanks in advance
 

agraham

Expert
Licensed User
Longtime User
Example from B4XPages.bas. Oddly I can't immediately find this in the B4X booklets documentation
but maybe I didn't look hard enough.
B4X:
#If B4A
'Returns the platform specific container.
Public Sub GetNativeParent (B4XPage As Object) As Activity
#Else if B4J
'Returns the platform specific container.
Public Sub GetNativeParent (B4XPage As Object) As Form
#else if B4i
'Returns the platform specific container.
Public Sub GetNativeParent (B4XPage As Object) As Page
#end if
 
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
or use where you can use libraries that are cross platform
For example for the ToastMessage
 
Upvote 0
Top