wishkit / wishkit-ios

In-App Feature Requests. Made Easy.
https://wishkit.io
MIT License
138 stars 24 forks source link

iOS 17, WishKit list is not showing! #52

Closed erenberkaydinc closed 3 months ago

erenberkaydinc commented 5 months ago

Hi, I implemented WishKit to my app as shown in the video

when navigating to "WishKit.view" by using NavigationLink, when the view loaded, the list is not updated, it doesn't show anything I some test "approved" features however I can see them only on the web

I saw the same issue on #36, I hope that will be fixed!

NavigationLink { WishKit.view } label: { Text("Feature Requests") }

Screenshot of WishKit

Device: iOS 17.0 WishKit version: 4.1.1

I had to use UIViewControllerWrapper to use WishKit

Thank you!

erenberkaydinc commented 5 months ago

This solution works for those who experience same problem

NavigationLink {
                        FeatureRequestsView()
                    } label: {
                                Text("Feature Requests")
                        }
                    }

struct FeatureRequestsView: View {
    var body: some View {
        WishKit.view
    }
}
martinlasek commented 3 months ago

I was able to reproduce it and it seems to only happen when you also have an .onReceive modifier present in the view. As @erenberkaydinc mentioned there's a simple workaround until I find a fix for this bug.

Simply wrap the WishKit.view in a container view and use that container view instead:

/// Container View
struct FeedbackContainerView: View {
    var body: some View {
        WishKit.view
    }
}

// Your App
struct SettingsView: View {
    var body: some View {
        VStack {
            ...

            NavigationLink {
                FeedbackContainerView()
            } label: {
                Text("Feature Requests")
            }
        }
    }
}
martinlasek commented 3 months ago

Duplicate of #36 :)