feat(pos): Capacitor mobile app setup — Android + iOS wrapper
Set up Capacitor to wrap the Nexus POS web app as a native mobile app. The app loads from the remote server URL so no bundling is needed. Includes native-bridge.js for camera, push notifications, haptics, and status bar integration when running inside the native shell. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
50
pos/mobile/README.md
Normal file
50
pos/mobile/README.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Nexus POS — Mobile App Build Guide
|
||||
|
||||
## Prerequisites
|
||||
- Node.js 18+
|
||||
- Android Studio (for Android)
|
||||
- Xcode 15+ (for iOS, macOS only)
|
||||
|
||||
## Architecture
|
||||
|
||||
The Capacitor app loads the POS from the remote server at
|
||||
`https://nexus.consultoria-as.com/pos`. This means:
|
||||
- The app requires internet on first load.
|
||||
- The PWA service worker handles offline caching after that.
|
||||
- No HTML/JS/CSS is bundled into the native binary.
|
||||
|
||||
## Android Build
|
||||
|
||||
```bash
|
||||
cd /home/Autopartes/pos
|
||||
npx cap sync android
|
||||
npx cap open android
|
||||
# In Android Studio: Build > Generate Signed APK
|
||||
```
|
||||
|
||||
## iOS Build
|
||||
|
||||
```bash
|
||||
cd /home/Autopartes/pos
|
||||
npx cap sync ios
|
||||
npx cap open ios
|
||||
# In Xcode: Product > Archive
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
npx cap run android --livereload --external
|
||||
npx cap run ios --livereload --external
|
||||
```
|
||||
|
||||
## App Icons & Splash Screens
|
||||
|
||||
Place source images in `mobile/resources/`:
|
||||
- `icon.png` — 1024x1024 app icon
|
||||
- `splash.png` — 2732x2732 splash screen
|
||||
|
||||
Then generate platform assets:
|
||||
```bash
|
||||
npx @capacitor/assets generate
|
||||
```
|
||||
BIN
pos/mobile/resources/icon.png
Normal file
BIN
pos/mobile/resources/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
Reference in New Issue
Block a user