Researching difficulty to extend a Native iOS Mendix application with special print capabilities

0
We want to create an iOS version of an existing Android app, and we are considering using Mendix for the advantages it offers. Later on, the native Android app will also be updated to the Mendix (universal) version. However, we have questions regarding support of printer drivers. Our Android version used a modified Printer driver to communicate with some kind of label printer (so not an Inkjet you have next to your desk). I believe it was done in Java - and since Mendix can be extended with Java, I was wondering if we can create an universal solution for both Android ánd iOS. TL;DR: If we want iOS devices to communicate with special printers and communicate specific information, instead of an a4 PDF, will using Mendix offer any advantage over Swift? Regardless, how difficult will it be to extend a Mendix application to communicate with a printer?
asked
3 answers
0

I am not very familiar with (label) printing solutions, but take a look at Zebra, which offers multi-platform custom print solutions: https://www.zebra.com/gb/en/products/software/barcode-printers/link-os/link-os-sdk.html

answered
0

It's possible to create both iOS and Android apps with Mendix because they are based on React Native. This makes it pretty easy to extend the mobile app with JavaScript. If you need to use Java however, you can run that on the server, and perhaps connect to a printer by ip-address? Running java on iOS can't be done as far as I know.

answered
0

Mendix is a full-stack product that offers multi-device deployment. This is important because that also underpins the design philosophy. It is a full-stack product first, meaning it has a server and a client component that are tightly integrated.

The server component is a runtime that interprets a model. This runtime can be extended with Java code, allowing you to do new and exciting things in your model.

The client is written in JavaScript, specifically React. On mobile this means React Native. You can extend this in two ways, with JavaScript directly for the logic and with React for the widgets.

Since it is possible to access native code from React, a widget could technically call native code like a print driver, but this would need to be native code that iOS can run so you would need to port your driver to Swift. From there you can then include it in your application bundle and access it in your Mendix Pluggable Widget written in React.

I would personally not take this route with Mendix, it would make a lot more sense to have the server runtime do the printing as that would move all the difficult bits to a platform over which you have more control. I do appreciate that this might not be an option as you might need local connectivity due to unreliable internet or security.

 

TL;DR Mendix would not offer any advantage over Swift when it comes to the printer driver as you still have to implement the printer driver. Mendix does offer advantages for the rest of your app and takes care of a lot of the complexities of integrating your iOS app with a back-end system, assuming you will use the Mendix server runtime.

 

answered