I get that error when I tried to use svg image:
https://bomobikids.takiacademy.me/uploads/images/imagesApi/62ed3f8eec557218869870.svg
Thread 8: "Cannot determine the PPI values for current device; returning 0.0f - hopefully this will crash your code (you CANNOT run SVG's that use CM/IN/MM etc until you fix this)" libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot determine the PPI values for current device; returning 0.0f - hopefully this will crash your code (you CANNOT run SVG's that use CM/IN/MM etc until you fix this)'
terminating with uncaught exception of type NSException
SVGImageView(url: URL(string: "https://bomobikids.takiacademy.me/uploads/images/imagesApi/62ed3f8eec557218869870.svg") ?? URL(fileURLWithPath: ""), size: size)
struct SVGImageView: UIViewRepresentable {
var url: URL
var size: CGSize?
func updateUIView(_ uiView: SVGKFastImageView, context: Context) {
uiView.contentMode = .scaleAspectFit
uiView.image.size = size ?? CGSize(width: 100, height: 100)
}
func makeUIView(context: Context) -> SVGKFastImageView {
let svgImage = SVGKImage(contentsOf: url)
return SVGKFastImageView(svgkImage: svgImage ?? SVGKImage())
}
}
I tried to use another image like it. It always works on the first time but when I run the app again the error is back