I have a client for which I've written three apps (+ variations) natively for iOS, Android, and Windows 10. I'm now considering consolidating the apps in some way, to reduce the amount of effort to maintain and update the apps. I've considered many different approaches and I'm now considering an approach using XML. I hope to get some feedback from people who have tried similar approaches and what their experience is.

First of all, I've ruled out C++ because the apps I'm consolidating do not contains a ton of logic. It would create too much overhead code to make it useful. They are mostly apps showing content download from a web service.

Secondly, I've also ruled out most of the cross-platform tools (PhoneGap and the likes) because my client wants to have their apps written in the native languages using the latest native capabilities (this allows them to check more boxes when Apple, or Google comes over to my client, allowing them more featuring opportunities). I know well-tested cross-platform solutions exist like Xamarin. But I'm worried having to work around shortcomings of these platforms. For example, the client design team has some pixel-nazis, so I need to have absolute control over layouts. I don't want to have to fight the system.

So my thoughts have been to write the UI (which is most of the meat of the apps) in XML. Here's some sample

<define-component name="button">
    <visualstate condition="aspect-ratio less-than 1.5 and width less-than 500pt">
        <stack orientation="horizontal">
            <image source="$source" accessibility-index="1"/>
            <label text="$title" accessibility-index="2"/>
    <visualstate condition="aspect-ratio greater-than-equal 1.5">

<screen id="main-menu">
    <visualstate condition="@portrait"/>
        <component name="button" source="button.png" title="Example Button"/>
It allows me to recursively define visual state for handling different aspect ratios with ease. It also allows me to recursively define components. For example, I could define a button component in XML with parameters. Then I could define a specific navigation button component that uses that button component. This allows me to keep the main XML that defines the screens quite brief. Another thing that the client requires is easy handling of accessibility (and ordering), which is handy to build in into the XML.

I have also thought about adding a separate XML document that could include basic functionality so that even the code could be specified in XML (the apps are quite easy).

So my question is, does look like a completely futile exercise, or have people approached the multi-platform problem in a similar way?

Again, my goal is less work, not more. I realize that introducing an XML specification introduces a lot of work. Either in specifying a proper schema for validation, or in simply writing the UI in the language. I'm just trying to find a nice balance between the cost of generalizing the code / UI in the apps using a custom system like I describe above, and the cost of maintaining many different code bases natively.