A cross-platform React Native app for storing and reading Chinese text articles, optimized for both iPhone and iPad.
npx)cd read-n-learn-ch
npm install
npm run build:dict # Downloads CC-CEDICT and builds the offline dictionary (~124k entries)
The
build:dictstep downloads the CC-CEDICT Chinese-English dictionary, cross-references HSK 1-6 word lists, and generates two JSON files underassets/dict/. This only needs to be run once (or when you want to update the dictionary data).
./restart-app.sh
This script will:
node_modules, ios, android, package-lock.jsonnpm installnpx expo prebuild --clean --platform iosnpm run iosIf you only change npm packages: ```npm install cd ios && pod install && cd .. npx expo run:ios
Or if npx expo run:ios has the Xcode 26 destination issues from before, use the approach from your restart-app.sh:
```npm install
cd ios && pod install && cd ..
xcodebuild -workspace ios/*.xcworkspace -scheme YourApp -destination 'generic/platform=iOS Simulator' -quiet
xcrun simctl install booted ios/build/Build/Products/Debug-iphonesimulator/YourApp.app
xcrun simctl launch booted com.yourapp.bundleid
npx expo start
| Change | Command |
|---|---|
| JS/TS code only | Metro hot-reloads automatically |
| npm packages (JS only) | npm install then restart Metro |
| npm packages (with native code) | npm install && cd ios && pod install && cd .. && restart-app.sh |
| Native module changes | restart-app.sh |
| Full clean rebuild | restart-app.sh (if it runs npx expo prebuild βclean) |
Key thing to remember: If the new npm package has native iOS dependencies (pods), you must run pod install after npm install. If itβs a JS-only package, just restarting Metro is enough.
npm run ios
Use this when running for the first time or after changing native dependencies.
npx expo start
Then press i to open the app in the iOS Simulator.
This is much faster β it skips the Xcode rebuild and serves the JS bundle directly. Code changes auto-refresh via Fast Refresh.
npx expo startNote: Some native features (camera, etc.) may require a development build instead of Expo Go.
| Scenario | Command |
|---|---|
| First time setup | ./restart-app.sh |
Changed package.json or app.json |
./restart-app.sh |
| Day-to-day coding | npx expo start β press i |
| Testing on physical device | npx expo start β scan QR |
| Format | Status |
|---|---|
| Plain text (.txt) | β Supported |
| PDF (.pdf) | β Basic text extraction |
| DOCX (.docx) | β Basic text extraction |
| Image OCR | β Basic text extraction |
The app is configured for iPad with:
supportsTablet: true in app.jsonrequireFullScreen: false)MIT