Daniel Saidi 6/1/2022

Making Swift package assets work in SwiftUI previews

Read Original

This technical article explains a common bug where SwiftUI previews crash when trying to access assets defined within a Swift package. It provides a detailed solution involving the creation of a custom Bundle extension to locate the correct resource bundle across different environments, including within Xcode previews.

Making Swift package assets work in SwiftUI previews

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser