Skip to content

SwiftUI Preview Not Working #791

@noob-programmer1

Description

@noob-programmer1

I’m having trouble with SwiftUI previews crashing when using Kotlin/Native code that references Moko resources. Specifically, I’m on Moko resources v0.24.4, and I’m calling LitePackRes.strings.pack_title.format(...) inside a Kotlin data class. This works fine at runtime, but the SwiftUI preview crashes (XCPreviewAgent aborts) whenever this code is run in the preview environment. Has anyone experienced issues with Moko resource initialization in previews, or found a workaround to mock or safely skip resource-based formatting calls during SwiftUI previews?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions