Skip to content

Commit 14cf4f6

Browse files
richardmeszarospepakriz
authored andcommitted
feat(capacitor): add iOS target
1 parent cd0fb34 commit 14cf4f6

26 files changed

Lines changed: 702 additions & 0 deletions

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ for persistent application data.
1818

1919
- Bun
2020

21+
For native iOS development, install Xcode and the Xcode Command Line Tools.
22+
Capacitor 8 targets iOS 15 and newer.
23+
2124
Install dependencies with exact versions:
2225

2326
```bash
@@ -61,6 +64,9 @@ Capacitor is available as the Android native target:
6164
bun run cap:android:sync
6265
bun run cap:android:dev
6366
bun run cap:android:build
67+
bun run cap:ios:sync
68+
bun run cap:ios:run
69+
bun run cap:ios:open
6470
```
6571

6672
Capacitor builds use the native HTTP bridge through `CapacitorHttp` so mobile
@@ -78,6 +84,40 @@ reload flow, and launches the native Android app. The HTTP server is used only
7884
for this debug flow so Android WebView does not reject Vite's self-signed HTTPS
7985
certificate.
8086

87+
For Capacitor iOS simulator development, run:
88+
89+
```bash
90+
bun run cap:ios:run
91+
```
92+
93+
For Xcode-driven iOS development, run:
94+
95+
```bash
96+
bun run cap:ios:sync
97+
bun run cap:ios:open
98+
```
99+
100+
Configure the signing team, bundle identifier, provisioning profile, display
101+
name, icons, launch screen, and deployment target in Xcode. The default bundle
102+
identifier is `me.payky`.
103+
104+
For iOS live reload on a physical iPhone, start Vite on the local network in one
105+
terminal:
106+
107+
```bash
108+
PAYKY_DISABLE_BASIC_SSL=1 bun run dev -- --host 0.0.0.0 --strictPort
109+
```
110+
111+
Then point Capacitor at the Mac LAN URL from another terminal:
112+
113+
```bash
114+
PAYKY_CAPACITOR_SERVER_URL=http://<mac-lan-ip>:5173 bunx cap run ios
115+
```
116+
117+
The iPhone and Mac must be on the same network. iOS does not have an `adb
118+
reverse` equivalent, so a physical device cannot use `localhost` to reach the
119+
Mac dev server.
120+
81121
The Android release build signs with `payky-release.keystore`. Set these
82122
environment variables before running `bun run cap:android:build`:
83123

biome.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"!node_modules",
1111
"!coverage",
1212
"!android",
13+
"!ios",
1314
"!src/routeTree.gen.ts"
1415
]
1516
},

ios/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
App/build
2+
App/Pods
3+
App/output
4+
App/App/public
5+
DerivedData
6+
xcuserdata
7+
8+
# Cordova plugins for Capacitor
9+
capacitor-cordova-ios-plugins
10+
11+
# Generated Config files
12+
App/App/capacitor.config.json
13+
App/App/config.xml

0 commit comments

Comments
 (0)