iOS Question B4A to B4I

klaus

Expert
Licensed User
Longtime User
No. Because Android and iOS are different operaring systems.
The program flow is different, some views are similar but others are different, so you need to rewrite the code for those.
Almost all code not in relationship with the operating system can be imported without changes.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
I am in the middle of porting a small app. As Klaus said, Android and IOS are two different beasts, once you start to get to grips with the ios program structure it's really not that difficult. Erel has done a great job on the one for one views and functions, which makes it easier for someone who knows B4a to get to grips with B4i.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
its almost the same, only small changes are needed so the convert from b4a to b4i should be very simple (if you dont use any special libs of course)
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Note that you can also use conditional compilation directives to share the exact same modules:
B4X:
#If B4A
'b4a specific code
#End If

#If B4i
'b4i specific code
#End If

There is also a new keyword in B4i named IsDevTool:
B4X:
If IsDevTool("B4i") Then Log("b4i")
This keyword will be added to B4A and B4J as well. It is useful when the code is compatible between all platforms.
 
Upvote 0

b2mvga

Member
Licensed User
Longtime User
How B4i works with databases? This use SQlite too?

The same code to acces a SQlite database (Select, Cursor, etc) works in B4i?
 
Upvote 0

Kwame Twum

Active Member
Licensed User
Longtime User
Does B4i work with remote databases?
Like MSSQL and MySQL.
 
Upvote 0

Kwame Twum

Active Member
Licensed User
Longtime User
great, purchasing soon... hope I don't face a similar issue I faced during the B4A purchase ;)
 
Upvote 0

Mark Turney

Active Member
Licensed User
Longtime User
As soon as I complete my B4A app, I'm buying this to get the other half of the app market...:)!!

Thanks for developing this Erel!!
 
Upvote 0

BarrySumpter

Active Member
Licensed User
Longtime User
Congratulations!

I know I asked about an iOS version of B4A a few years ago.
Well done!
Will the B4A objects work in B4i?
Or do we have to wait for the original developers to convert?

I tried to get out of development but this might bring me back in.

Wishing you all the very best in your B4i endeavours!
 
Upvote 0

santiago

Member
Licensed User
Longtime User
Can we deploy services in v4I in the same way we do in v4A?
I explain : Can we develop apps to IOS running background services using v4i the same like Android using v4A?
 
Upvote 0

ViMeAv ICT

Member
Licensed User
Longtime User
I'm having a B4a app using the following libraries:
animation, b4azxing, byteconverter, core (v.3.80), IME, JSON, PDF, Phone,
RandomaccesFile, Reflection, Scrollview2D, SMB, SQL, Stringfunctions.

Is this possible to port into ios apps?
 
Upvote 0

Gary Milne

Active Member
Licensed User
Longtime User
Note that you can also use conditional compilation directives to share the exact same modules:
B4X:
#If B4A
'b4a specific code
#End If

#If B4i
'b4i specific code
#End If

There is also a new keyword in B4i named IsDevTool:
B4X:
If IsDevTool("B4i") Then Log("b4i")
This keyword will be added to B4A and B4J as well. It is useful when the code is compatible between all platforms.

My app is 16,000 lines in B4A and I'm going to port it over to B4I. Never having done this I don't know what percentage of the code will be common and what will be unique. For an app this size do you think it would be practical to share the code base and use #If B4A \ #If B4I? I notice you opted not to take that approach for things like DBUtils and KeyValueStore. What approach would you recommend?
 
Upvote 0
Top