iOS Question Same Code Base for B4A and B4i

Henrique Haas

New Member
Licensed User
Hello, I am starting a app project, targeting Android and iOS.
Since B4a and B4i use the same code and logic, how can I have a single code repository that I might use in both environments?
I've seen people using #If / #Endif conditions to split code and compile. Is this the best way to do? What about the View files, can I have different folders for each set of files?

Thank you
 

klaus

Expert
Licensed User
Longtime User
You cannot have same projects for B4a and B4i. You need one project for each operating system
The operating systems are different, some object are almost the same some others are different.
None UI code can be the same.
You could have a look at chapter 11 Differences B4i <> B4A in the B4i Beginner's Guide.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
1. I've seen people using #If / #Endif conditions to split code and compile. Is this the best way to do?
2. What about the View files, can I have different folders for each set of files?

1. yes, when using shared modules or class files you can do it like that.
2. since you have 2 project folders you just need to copy/sync the Files folder and add the changes to it if there are any.
 
Upvote 0
Top