huybuidac / SwiftUIFontIcon

The easiest way to implement font icons in your SwiftUI project.
https://github.com/huybuidac/SwiftUIFontIcon
MIT License
128 stars 12 forks source link

Not able to load FontIcon in Widget Extension #3

Open MehulSojitra16 opened 3 years ago

MehulSojitra16 commented 3 years ago

I am getting an error "archiving error" when try to use in Widget Extension. However it is working fine in iOS app.

Here is my code:

var body: some View {
        VStack(alignment: .leading) {

            HStack{
                Text("ionicons:").frame(width: 150, alignment: .trailing)
                FontIcon.text(.ionicon(code: .md_people), color: .white)
                    .background(Color.blue)
                Spacer()
            }.frame(height: 80)

        }
    }
huybuidac commented 3 years ago

@MehulSojitra16 sorry for late, can you give me a demo project?. I'm not familiar with iOS App.

xeieshan commented 3 years ago

@huybuidac any update on this?

I am facing same issue. I have a ReactNative Project which uses native Extension (WidgetKit) and I want to use FontAwesome in Widget.

cc @MehulSojitra16