feat: native biodata generator (fix App Store 4.2 rejection) - #24
Merged
Conversation
The app previously launched with two buttons that both loaded snapbiodata.com — a website wrapper, which Apple rejected under Guideline 4.2 (Minimum Functionality). Rebuild the core experience as a fully native, offline app: - Native multi-section form (Personal / Family / Contact) driven by the ported biodata field schema - Native photo picker (expo-image-picker) for a profile photo - Template picker + document preview (Traditional / Elegant / Modern) rendered from locally-composed HTML - Export a print-ready PDF on-device (expo-print) and share via the native share sheet (expo-sharing); also print / save-as-PDF - Save, reopen, and delete drafts locally (AsyncStorage) — no network, no sign-up Also: switch to react-native-safe-area-context (core SafeAreaView is deprecated in RN 0.81), add iOS NSPhotoLibraryUsageDescription to all schemes, and add jest mocks so the render test stays green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Saving on every keystroke did a full read-modify-write of the records list each time, so concurrent writes during fast typing could race and drop edits. Keep the draft live in memory and persist only on Back / Preview, which is race-free and avoids the storage churn. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Make the app launch cleanly and look great end-to-end. Launch / stability - Fix a redbox on every launch: react-native-safe-area-context's <SafeAreaProvider> native view emits inset changes through the legacy RCTEventEmitter path, which isn't registered as callable under the new architecture (bridgeless) in RN 0.81. Feed insets statically from initialWindowMetrics via SafeAreaInsetsContext instead — every screen keeps correct insets with no native event emitter, so no error. - Use babel-preset-expo so process.env.EXPO_OS is inlined; without it expo-modules-core (expo-print / image-picker) failed to initialise. - Add SafeAreaProvider initialMetrics earlier; now superseded by the static-context approach above. UI - Redesign Home: branded maroon header that clears the status bar, avatar cards for saved biodata, polished empty state with a "See a sample biodata" shortcut, floating Create CTA. - Redesign Editor: visual template thumbnails, dashed photo picker, heading chips, gold-accented section headers, sticky action bar. - Render the Preview natively (new BiodataDocument component) instead of a WebView — the WKWebView rendered blank on simulator and added a "web wrapper" smell. The app now ships zero web views; the PDF export still uses HTML via expo-print (html.ts). - All screens handle safe-area insets and status-bar style directly. Tooling - scripts/run-ios.sh + yarn ios:run[:dev|:staging|:prod]: one command to install pods, free/refresh Metro, boot the sim, and build+launch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Address review nits so the diff is warning-free: - EditorScreen: move the template-thumbnail static styles into the StyleSheet and pass dynamic colours as variables, clearing all react-native/no-inline-styles warnings. - App.tsx: move the INSETS constant below the import block so all imports stay at the top of the module. No behavioural change; ESLint now reports 0 problems. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
App Store submission 1.0 (42) was rejected under Guideline 4.2 – Design – Minimum Functionality: both home-screen buttons opened
snapbiodata.com, so the app was a website wrapper. A resubmit of the same binary would fail again — the only durable fix is real native functionality.What this PR does
Rebuilds SnapBiodata as a fully native, offline biodata generator. No WebViews, no external website.
Core feature
src/data/biodata.ts)expo-image-picker, embedded as a data URLsrc/components/BiodataDocument.tsxrenders the document on-screen (crisp, reliable; replaced a WebView that rendered blank on simulator)expo-printrenders matching HTML (src/templates/html.ts) to a print-ready PDF on-device; shared viaexpo-sharingStability fixes (found while running it on the simulator)
process.env.EXPO_OSis inlined; without itexpo-modules-corefails to initSafeAreaProvider— its native view emits inset changes via the legacyRCTEventEmitterpath, which isn't registered under the new architecture (bridgeless) in RN 0.81 → uncaught-error redbox on every launch. Insets are now fed statically frominitialWindowMetricsviaSafeAreaInsetsContext.UI
Branded maroon header, avatar cards, polished empty state, visual template thumbnails, gold-accented sections, sticky action bars, safe-area handled on every screen.
Tooling
scripts/run-ios.sh+yarn ios:run[:dev|:staging|:prod]— one command: pods, Metro, boot sim, build + launchNew dependencies
expo-print,expo-sharing,expo-image-picker— Expo modules, autolinked on both platforms. Requires an EAS native rebuild (build number auto-increments via remote versioning).Verification
tsc --noEmiteslint— 0 warningsjestBefore resubmitting to App Review
🤖 Generated with Claude Code