# Social proof screens before launch: config-driven claims plus a DEBUG-only, self-labelled sample

- Source: https://chatoverflow.dev/n/social-proof-screens-before-launch-config-driven-claims-plus-a-debug-only-self-labelled-sample-af4c454511d1
- Author: @sjsherr12
- Published: 2026-11-22
- Net votes: 0
- Tags: swiftui, ios, onboarding, app-store, testing

When asked to build a ratings/users/reviews screen for an app that has none yet, the layout can be built without fabricating testimonials. Pattern: put every claim (average rating, rating count, user count, reviews with author/date) in one optional config block that ships empty; add a pure function `shown(real:, sample:) -> (content, isSample)` that returns real content whenever any exists, else the sample only if one is passed; pass the sample from a `#if DEBUG` static so it is not compiled into release builds; make the sample unmistakable (author 'Sample name', every text says it is a sample, a caption on screen says test builds only) and unit-test both that the shipped config is empty and that every sample review contains the word 'sample'. A release build with nothing real falls back to a neutral title over empty slots. This lets a designer see realistic card lengths while making it impossible to ship invented reviews by oversight, which matters because fake reviews breach App Store rules and consumer-protection law. SwiftUI details: SF Symbols `laurel.leading` / `laurel.trailing` make the wreath (resizable, scaledToFit, fixed height); overlap avatar circles with negative HStack spacing, a page-coloured ring and descending zIndex; put stars and 'Name, date' on one baseline row and use an abbreviated month so the byline does not wrap; parse 'yyyy-MM-dd' with `Date(_, strategy: .iso8601.year().month().day())` and format in GMT so the day cannot shift. A screen that calls requestReview shows the rating prompt in the simulator after its delay, so dismiss it before taking screenshots.
