惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
爱范儿
爱范儿
量子位
博客园 - 聂微东
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
GbyAI
GbyAI
MyScale Blog
MyScale Blog
IT之家
IT之家
P
Proofpoint News Feed
M
MIT News - Artificial intelligence
The Cloudflare Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hugging Face - Blog
Hugging Face - Blog
The Register - Security
The Register - Security
Microsoft Security Blog
Microsoft Security Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs
博客园 - 三生石上(FineUI控件)
Y
Y Combinator Blog
雷峰网
雷峰网
V
Visual Studio Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
博客园 - 叶小钗
D
DataBreaches.Net
B
Blog
B
Blog RSS Feed
大猫的无限游戏
大猫的无限游戏
aimingoo的专栏
aimingoo的专栏
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
小众软件
小众软件
腾讯CDC
T
Threat Research - Cisco Blogs
SecWiki News
SecWiki News
Martin Fowler
Martin Fowler
D
Docker
Cisco Talos Blog
Cisco Talos Blog
T
Tenable Blog
Webroot Blog
Webroot Blog
宝玉的分享
宝玉的分享

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
From web to iOS in 30 days: Expo + AI-assisted code conversion
Caden Burles · 2026-05-14 · via DEV Community

From web to iOS in 30 days: Expo + AI-assisted code conversion

Last month I shipped Fitnit's iOS app. Fitnit's a fitness app that uses your phone camera to count exercise reps with AI and reads meal photos for macros. The web version had 4,779 users when I made the call to ship native.

I didn't write a Swift app from scratch. I used Expo + React Native for the shell, AI to translate most of my existing JS into TypeScript that runs under React Native, and wrote selective Swift native modules only for the performance-critical parts. Took ~30 days end to end, mostly solo.

This is a different story than "pure native Swift rewrite." Here's what actually happened.

The architecture decision: pure Swift vs Capacitor vs Expo

When I started, I had three options. Each had different math.

Pure Swift / SwiftUI from scratch. The "ideologically clean" path. Best performance, best App Store-citizen status, fully native UX. Also: a complete rewrite of the entire client, in a language I don't ship daily, with zero code reuse from the web version. Solo founder math says no.

Capacitor (web app in a native shell). Cheapest path — you literally wrap your existing web app in a WebView. But Fitnit's core loop is "camera → 30fps pose detection → form feedback in real time." That's the case where Capacitor's bridge becomes the bottleneck. Tried it for a day, confirmed the performance gap was unworkable, moved on.

Expo + React Native + selective native modules. The middle path. React Native for the shell + most app logic; Expo's tooling (EAS Build, EAS Submit, expo-router, expo-camera) for the iOS-specific glue; custom Swift native modules via the Expo Modules API for the pieces where performance actually matters.

Picked option 3. Tradeoff accepted: not as performant as pure Swift, not as cheap as Capacitor, but the only path where one person can ship in 30 days while reusing the bulk of the existing codebase.

The AI-assisted conversion

The web app is vanilla JS + Vite. To go to React Native, every component, every hook, every piece of business logic needed to either translate cleanly to React Native or be rewritten.

I used Claude Code for the bulk of the translation (Codex or Cursor work too — pick the tool you're already comfortable with; the technique is what matters). The workflow was:

  1. Paste an entire web component into the AI, ask for "React Native equivalent using Expo Router + StyleSheet."
  2. The AI returns a first draft that's ~80% correct.
  3. Manually fix the 20%: navigation patterns, gestures, anything platform-specific the AI guessed wrong about.
  4. Move to the next component.

What AI translation handled well:

  • Component structure (functional components, hooks, props)
  • State management logic (the AI is fine porting useState / useEffect / useMemo)
  • All the pure business logic: rep-counting state machines, calorie math, macro target calculations — these translated to TypeScript verbatim
  • Supabase client calls (same SDK works on RN with one config tweak)

What AI translation handled badly:

  • Navigation. Web routing → Expo Router is a different mental model. Had to do that manually.
  • Anything camera-related. The AI tried to invent web-shaped APIs that don't exist on RN. Had to scrap and rewrite using expo-camera and the native module bridge.
  • Conditional rendering for tiny screens. The AI didn't account for one-handed iPhone usage; spacing needed manual passes.

Net: the AI saved me maybe 40-50% of the conversion time. Not magic, but real. And it was much more accurate than I expected for the pure-logic translations.

What carried over (more than I expected)

Everything backend. Supabase doesn't care which client is hitting it — same database, same auth, same edge functions. The iOS app uses the same users, workouts, and nutrition_entries tables the web app does. A user signing up on iOS logs into the web app and sees their workout history seamlessly. Single biggest reason to use Supabase over Firebase a year ago — knowing this day was coming.

The data model. Rep counts, form scores, nutrition entries, macros — same shape on both clients. No migration, no API translation layer.

All the pure logic. Calorie math, macro targets, the rep-counting state machine logic, the form-score heuristics — all of it stayed as TypeScript and ran inside React Native unchanged. This is the big payoff of choosing Expo over Swift-from-scratch. With pure Swift I would have rewritten ~5,000 lines of business logic in a new language. With Expo I rewrote ~0.

The pSEO + marketing site. That stays vanilla JS + Vite + Cloudflare Pages. The iOS app doesn't ship that part of the codebase. The landing page at /ios just deep-links to the App Store.

The brand. Same colors, same name, same positioning ("AI rep counting + photo nutrition tracking, all in one app"). Switching between web and iOS should feel like Spotify on desktop vs phone — not like two different products.

What I rebuilt natively (Swift, via Expo Modules API)

The whole appeal of Expo for an AI fitness app is that you can drop down to native Swift when the bridge cost is too high — without leaving the React Native world. The Expo Modules API makes this surprisingly approachable.

I wrote native Swift modules for two things:

1. Pose detection (the highest-leverage native module)

Web version uses MediaPipe Pose. On iOS, going through MediaPipe-via-RN was possible but added latency. Going direct to Apple's Vision framework via a native module was faster and let me use APIs that don't have RN wrappers.

The module shape:

// modules/pose-detection/ios/PoseDetectionModule.swift
import ExpoModulesCore
import Vision
import UIKit

public class PoseDetectionModule: Module {
  public func definition() -> ModuleDefinition {
    Name("PoseDetection")

    AsyncFunction("detectFromBuffer") { (imageData: Data) -> [String: Any] in
      let handler = VNImageRequestHandler(data: imageData, options: [:])
      let request = VNDetectHumanBodyPoseRequest()
      try handler.perform([request])

      guard let observation = request.results?.first else {
        return ["points": [], "confidence": 0]
      }
      return PoseSerializer.serialize(observation)
    }
  }
}

Enter fullscreen mode Exit fullscreen mode

And the React Native side:

// app/components/RepCounter.tsx
import PoseDetection from '../../modules/pose-detection';

async function processFrame(frameData: Uint8Array) {
  const result = await PoseDetection.detectFromBuffer(frameData);
  return updateRepStateMachine(result.points);  // ← pure TS, same as web
}

Enter fullscreen mode Exit fullscreen mode

Note what's happening: the state machine (the part that decides "this is a rep" by watching elbow angle + shoulder Y over time) runs in plain TypeScript. The same logic, more or less, that ran in the web app. Only the frame-to-keypoints inference crosses the bridge to Swift.

That split is the whole game. Native where speed matters; JS/TS for everything else.

2. HealthKit bridge

Apple Health integration needed a small Expo native module too — read/write workouts and nutrition data into HKHealthStore.

The Swift side is ~80 lines:

import ExpoModulesCore
import HealthKit

public class HealthKitModule: Module {
  let store = HKHealthStore()

  public func definition() -> ModuleDefinition {
    Name("HealthKit")

    AsyncFunction("requestPermissions") { () -> Bool in
      let types: Set<HKSampleType> = [
        HKObjectType.workoutType(),
        HKQuantityType.quantityType(forIdentifier: .dietaryEnergyConsumed)!,
        // ... etc
      ]
      try await store.requestAuthorization(toShare: types, read: types)
      return true
    }

    AsyncFunction("saveWorkout") { (params: WorkoutParams) -> Void in
      let workout = HKWorkout(
        activityType: params.activityType.hkType,
        start: params.startedAt,
        end: params.endedAt,
        duration: params.duration,
        totalEnergyBurned: HKQuantity(unit: .kilocalorie(), doubleValue: params.calories),
        totalDistance: nil,
        metadata: ["FitnitExerciseType": params.exerciseType]
      )
      try await store.save(workout)
    }
  }
}

Enter fullscreen mode Exit fullscreen mode

Total native iOS code in the entire Fitnit project: ~300 lines across two modules. Everything else is TypeScript/React Native.

EAS Build + EAS Submit (the deployment story)

The other thing Expo gets you that's underrated: the deployment tooling. EAS Build handles iOS signing, archive, and binary creation in the cloud. EAS Submit pushes that binary to App Store Connect.

Effective dev loop:

eas build --platform ios --profile production
# ... ~15 min later, .ipa file is built and signed in the cloud ...
eas submit --platform ios --latest
# ... uploaded to App Store Connect, ready for review ...

Enter fullscreen mode Exit fullscreen mode

No Xcode dance. No fiddling with provisioning profiles in a UI. No "what version of Xcode does this require." For a solo founder who would rather spend that time on product, EAS pays for itself within the first build.

App Store submission: the actual experience

You hear horror stories. Mine wasn't one but it wasn't trivial either.

Round 1 rejected — guideline 2.1 (App Completeness): they wanted more screenshots showing core functionality. Easy fix, recaptured + framed the additional screenshots, resubmitted.

Round 2 rejected — guideline 5.1.1 (Data Collection and Storage): they wanted privacy clarifications around camera usage. The privacy policy on fitnitapp.com/privacy already explained that camera frames stay on-device, but the App Store privacy nutrition labels needed updating to match. Fix: tightened the labels in App Store Connect, re-attached the existing privacy policy URL, resubmitted.

Round 3 approved. [Adjust the round count + timing to match your actual experience.]

Useful tip I wish I'd had: prepare the App Store Connect listing BEFORE submitting the binary. Screenshots, descriptions, keywords, pricing, privacy labels — get all of those right first, then submit. Reviewers seem more lenient with apps that have a polished listing.

What I'd do differently

1. Ship to TestFlight on day 5, not day 25. I held off on TestFlight because I wanted the iOS experience to be feature-complete before letting anyone touch it. Mistake — getting 20 real testers on the build a week early would have caught at least three bugs I shipped to App Store review.

2. Write the native modules first, then build the RN screens against them. I did it the other way around — built the RN UI, then realized I needed the pose detection module, scrambled to write it, found that its return shape didn't quite match what my UI expected. Doing the native modules first defines the data contract, and then the RN side is just composing against it.

3. Build the iOS landing page (/ios) WHILE the app is in App Store review. I built it after approval and lost ~10 days of organic discovery I could have been earning. The /ios page should be ready, indexed, and getting traffic by the time the App Store listing goes live so they reinforce each other.

The honest take on Expo + AI for solo founders

Pure Swift gets you a slightly better app. Expo + AI-assisted conversion gets you a shipped app in 4× less time with 95% of the user-facing quality. For most solo founders, the second one is the right tradeoff.

The Expo Modules API is the unlock. You're not committing to "everything in JS." You're committing to "JS by default, native where it matters." For an AI fitness app where the camera pipeline is the entire product, having an escape hatch into Swift for that specific subsystem is exactly what you need.

If you're sitting on a web app and you're considering native iOS, I'd skip the Capacitor approach unless your app is genuinely a thin layer over a website. Expo + selective native modules is the path I'd recommend without reservation.

The numbers, 30 days in

  • Web: 4,779 users, still growing
  • iOS: 406 installs, [number] of which converted to Pro
  • App Store rating: ★★★★★ from 3 reviews so far

If you've gone from web-first to native iOS with Expo, I'd love to hear what surprised you most. I'm at fitnitapp.com.

And if you'd like to try it on iOS : Fitnit on iOS