iOS Question Shared Modules Managment

iCAB

Well-Known Member
Licensed User
Longtime User
Now that I am starting to port an application from B4A to B4I, this is becoming more and more important. I am wondering what is the proper way of handling something like this:

We have a shared folder that we used originally for multiple Android Apps. Now that we are reusing these modules with B4I, we are pointing B4I to use the same shared folder. Some of the B4A modules can't be easily reused with B4I or some modules will end up being OS specific.
Is there a way to use a secondary shared folder among B4I apps together with the originally shared folder.
 

iCAB

Well-Known Member
Licensed User
Longtime User
Currently no. You can use a naming convention to distinguish between the different types of modules.

For example set a B4A or B4i prefix to all modules that are not cross platform compatible.

Remember that you can use #If B4A / B4i in your code for platform specific code.

Actually that's exactly what I am doing now, however it comes with the disadvantage of not being able to use the same code module name at a higher level (unless if I am missing something). Example when using CallSubDelyed, or referencing code module sub externally as in CodeModule.Sub

I was wondering, if you may want to consider supporting different file extensions (instead of all being .bas). This could serve the same purpose and will most likely provide a more elegant solution, and if I am not mistaken, it requires very little effort from your side.

Thanks again
 
Upvote 0

iCAB

Well-Known Member
Licensed User
Longtime User
Thanks Erel.
But I was hoping for
B4X:
TargetModule.Sub

to avoid #if in the code body.

That's why I was suggesting the extensions. Possibly:
.bas is common to all B4X
.bxx is B4i only
.byy is B4a only
etc..
 
Last edited:
Upvote 0
Top