Stefan Oltmann04/18/2023, 9:44 AM
for my SVG & bitmap resource images. For JVM we have
, which are not available for Compose for iOS. I have them in a folder, but I wouldn't mind (for now) to further use the
as SwiftUI requires me to. I looked at https://github.com/Kotlin/kmm-production-sample/tree/compose-app which uses https://github.com/Skeptick/libres to do that, but this unfortunately requires CocoaPods, which I don't want in my project setup. What are other options to use SVG & Bitmaps for my Icons with Compose for iOS?
, but I would like to continue using SVGs for my icons.
Michael Paus04/18/2023, 1:14 PM
which you can get via
and for SVG a modified version of
from the desktop implementation. It is actually quite simple because both desktop and iOS are based on Skia. I just had to modify the loader so that it can read from a ByteArray instead of a Java stream. You can read the raw ByteArray as a resource via the resource package mentioned above.
androidx.compose.ui.res.SVGPainter and androidx.compose.ui.graphics.vector.DrawCache
Stefan Oltmann04/18/2023, 1:23 PM
alex00904/18/2023, 1:40 PM
Stefan Oltmann04/18/2023, 1:40 PM
Stefan Oltmann04/18/2023, 1:41 PM
ayodele04/18/2023, 10:35 PM