Devlog: June 13, 2023

I’ve heard that friends don’t let friends ship an app without adding a request for reviews. So I added that.

I followed two apple guides—the Human Interface Guidelines and requesting review documentation. I kinda just copied what the docs show—request once per version after at least 4 completed actions, and after the user has paused for 2 seconds.

.onReceive(viewState.$comparison
    .debounce(for: 2.0, scheduler: RunLoop.main)
) { _ in
            let version = AppInfo.fullVersion
            guard viewState.activeSheet == nil
                    && viewState.comparison.first == nil
                    && viewState.comparison.second == nil
                    && version != lastVersionPromptedForReview
                    && searchesCompleted > 3 else { return }
            
            requestReview()
            lastVersionPromptedForReview = version
        }

Here you can see some of the ugly internals of my app. The View I want to request a view on is show based on the state of the current comparison/search. So I debounce that change. Once it has settled for 2 seconds, I check if any sheets are shown, if the search is empty, and if I’ve already request a review this version. Might be better ways, but I’ll give this a shot. I’m not sure if there is a great way to test it…

Next, in the spirit of learning new things, I think I’ll try adding some in app purchases. Just a couple small tips that will unlock alternate icons or something.



Date
June 13, 2023