RedMadRobot / figma-export

Command line utility to export colors, typography, icons and images from Figma to Xcode / Android Studio project
MIT License
718 stars 114 forks source link

Fix SwiftUI preview crashes when accessing assets from a nested Swift Package. #171

Closed y-okudera closed 2 years ago

y-okudera commented 2 years ago

Hi, Thank you for an amazing utility!

Fixed SwiftUI preview crashes when accessing assets from a nested Swift Package.

Crash Info

I have two modules the Presentation and the DesignSystem. The DesignSystem module has Color extension generated by figma-export. The Presentation module has SwiftUIView that using Color extension of DesignSystem. As soon as it touches the assets from the DesignSystem module, the preview crashes.

スクリーンショット 2022-05-29 18 49 48

Reference

https://developer.apple.com/forums/thread/664295?login=true#reply-to-this-question

subdan commented 2 years ago

Thanks for the PR, @y-okudera. I will review the PR by the end of the week.

y-okudera commented 2 years ago

@subdan Thank you for reply. I'm sorry, I completely forgot to fix the test code. I will commit it later.

y-okudera commented 2 years ago

@subdan Thanks for the review. Those code fixes have been completed.

y-okudera commented 2 years ago

Thanks for the re-review, @subdan . I will fix the stencil file by the end of the week.