Files
ForumMobile/readme.md
2026-04-16 18:27:24 -05:00

1.8 KiB

Run in Browser

npm run start

Install Native Tools

https://capacitorjs.com/docs/ios#adding-the-ios-platform

npm install @capacitor/ios npx cap add ios

Run On Device

To Open XCode: npx cap open ios

Run this command to rebuild for iOS npm run build && npx cap copy ios

If getting black screen: npx cap sync iOS

iOS:

Browser: Dev Front and Dev Back (localhost)

This option should be at the top level of capacitor.config.json "server": { "url": "http://sam.local:5173", "cleartext": true },

Browser: Prod Front and Prod Back

Run: vite build npx serve dist

If you need to login again: run localStorage.clear() in the browser dev tools console and then refresh the page.

iOS:

Dev Front, Dev Back (localhost)

This option should be at the top level of capacitor.config.json "server": { "url": "http://sam.local:5173", "cleartext": true },

Dev Front, Prod Back (frm.so)

Add "https://frm.so" to VITE_API_URL in .env.development

Prod Front, Prod Back (frm.so)

Remove the "server" object from capacitor.config.

Various Commands

npx cap config - this will list the full configuration currently being used

Architecture

In Development, API routes are routed using the vite.config.js.

Notes

Background Color: In src/manifest.json, "#31d53d" refers to the green color which is visible in the background in the web version. This is not visible in the built version.

Test Push Notifications: https://icloud.developer.apple.com/dashboard/notifications/teams/53DK57C7ZF/app/russell.sam.forum/notifications/create?notificationId=8bb87cf2-9590-4a63-b7e1-e4c7f2a2c879&environment=DEVELOPMENT&notificationType=push

Note: Even if built in "production" mode, the tokens will still be considered "development" by Apple until the app is actually deployed