iOS Question B4A to B4i porting checklist


Active Member
Licensed User
I’m beginning to evaluate porting a B4A app to B4i.
The app has the following structure.
  • Multiple activities built using TabStripViewPager
  • Global objects in the Starter service
  • A service for handling Bluetooth communication
I’m building a checklist of steps as prerequisite for a success porting attempt.
I’m going to share it here to gather feedback and ideas, since it will be my first B4i project, even if I have some experience in B4A.
As an absolute requirement, the porting job is not a one shot attempt: the app is alive and evolving, so resulting code should be maintainable and able to compile both versions for new simultaneous releases.

Before even attempting to open the project in B4i, I think that some code rewrite is necessary on the actual app.
  1. convert generic code and data to XUI equivalents (MsgBox and Colors are the first 2 examples that comes to mind)
  2. Convert native views to B4XView
  3. Convert CustomViews to XUI CustomViews
  4. Encapsulate code actually in Starter service in a single instance object, that will be called in the Starter service in B4A and somewhere else in B4i (to be defined)
  5. Convert all activities to B4XPages.
  6. Evaluate the usage of TabStrip, since it’s not available on B4i; so I’ll need some platform-specific code (not good), or design a different interface (avoid, since it will affect current users), or find a B4X alternative (best choice, small adjustments required, but does it really exist?)
  7. Rewrite the background service, encapsulating communication code in an external object. I know services doesn’t exist in B4i and this is could be a significant hurdle. Communication to/from the service should be rewritten to hide platform differences, or using platform-specific code will be unavoidable. The different handling of background services of iOS will probably mean that the app should be used only in foreground on that platform.