mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix: use https for ios mobile dev server
This commit is contained in:
@@ -15,20 +15,18 @@
|
||||
|
||||
## Set up development environment
|
||||
### Build the development app
|
||||
- comment in `server` section in **capacitor.config.ts**, and replace `process.env.LOGSEQ_APP_ASERVER_URL` with your `http://your-local-ip-address:3001` (run `ifconfig` to check).
|
||||
```typescript
|
||||
server: {
|
||||
url: "process.env.LOGSEQ_APP_ASERVER_URL",
|
||||
cleartext: true
|
||||
}
|
||||
```
|
||||
- Generate the local HTTPS certificate used by Shadow CLJS:
|
||||
```shell
|
||||
bb dev:mobile-https-cert
|
||||
```
|
||||
- Install `ssl/mobile-dev/logseq-dev-ca.cer` on the iOS device and enable full trust for it in iOS Settings.
|
||||
- Working directory: Logseq root directory
|
||||
- Run `pnpm install && pnpm mobile-watch` from the logseq project root directory in terminal.
|
||||
- Run `pnpm exec cap sync ios` in another terminal to copy web assets from public to *ios/App/App/public*, and create *capacitor.config.json* in *ios/App/App*, and update iOS plugins.
|
||||
- Run `LOGSEQ_SHADOW_HTTPS=true pnpm mobile-watch` from the logseq project root directory in terminal.
|
||||
- Run `LOGSEQ_APP_SERVER_URL=https://your-local-ip-address:3002 pnpm exec cap sync ios` in another terminal to copy web assets from public to *ios/App/App/public*, create *capacitor.config.json* in *ios/App/App*, and update iOS plugins.
|
||||
- Connect your iOS device to MacBook.
|
||||
- Run `pnpm exec cap open ios` to open Logseq project in Xcode, and build the app there.
|
||||
|
||||
or, you can run `bb dev:ios-app` to do those steps with one command if you are on MacOS. To download bb, see https://github.com/babashka/babashka#installation. Also, in order to use mobile bb tasks on macOS, `gsed` needs to be installed in your system (run `brew install gnu-sed` to install).
|
||||
or, you can run `bb dev:ios-app` to generate the certificate, start the HTTPS mobile watcher, sync iOS with the HTTPS dev-server URL, and open Xcode. To download bb, see https://github.com/babashka/babashka#installation. Also, in order to use mobile bb tasks on macOS, `gsed` needs to be installed in your system (run `brew install gnu-sed` to install).
|
||||
|
||||
Note: if the dev build isn't reflecting the change of code, restart `pnpm mobile-watch` and run `pnpm exec cap sync ios` again.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user