Why cant we use SVG image format in native?

0
I’m not sure if this is a Mendix thing or an Android/iOS thing. Googling it gives very mixed results; some people say it can be done, others had roundabout fixes, and others say you can’t use SVG on mobile. Would you please clear this up for me?   Thank you!  
asked
3 answers
1

In Mendix 8.4.1 I am adding SVG images as regular images within an ImageCollection.

Aside from this way of adding, it is going to be difficult. The functionality doesn't yet work in React Native out of the box.

What I have previously done is create a custom widget and use react-native-svg (https://github.com/react-native-community/react-native-svg)

Now comes a tricky part, width (at least) that Mendix version, you aren't using the latest React Native version and some manual steps are required (described on the Github page).

answered
0

My best guess on lack of SVG support is that React Native doesn’t natively support SVG in its Image component. It looks like there are libraries that could add these capabilities: https://github.com/vault-development/react-native-svg-uri and https://github.com/react-native-community/react-native-svg

You could leverage one of these with a custom widget now, and I expect that we might see this capability built into the platform at some point in the future.

answered
0

it seems you are able to add svgs in native.

further more, if you remove the fill color of an icon it can be adaptively changed by your styling.

answered