Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

Name the real client library in the API docs

securityvoid70975a6a564a
diff --git a/Documents/en/machines/automation-api.md b/Documents/en/machines/automation-api.md
index 43812ae5..a50c51ca 100644
--- a/Documents/en/machines/automation-api.md
+++ b/Documents/en/machines/automation-api.md
@@ -64,7 +64,7 @@ Rules that trip up hand-written clients:
- A request with an `Origin` header, or with a `Host` other than `vphoned`, `localhost`, `127.0.0.1` or `::1`, gets `403`. This blocks browser pages from reaching the API.
- `GET` routes only read. To change a setting, use `PUT` or `POST`, for example `PUT /v1/low-power-mode` with `{"enabled": true}`.
-Swift apps can use the `VPhoneAPIClient` in the `VPhoneAPIKit` package, which sends the token for you; see the reference for an example.
+Swift apps can use the `VPhoneAPIClient` in the `VPhoneExternalAccessKit` library, which sends the token for you; see the reference for an example.
## Without a network listener
diff --git a/Documents/ja/machines/automation-api.md b/Documents/ja/machines/automation-api.md
index 90e6990d..0463c644 100644
--- a/Documents/ja/machines/automation-api.md
+++ b/Documents/ja/machines/automation-api.md
@@ -64,7 +64,7 @@ websocat --binary "ws://127.0.0.1:8765/v1/shell?token=$TOKEN&cols=120&rows=40"
- `Origin` ヘッダのあるリクエスト、または `Host` が `vphoned`、`localhost`、`127.0.0.1`、`::1` 以外のリクエストには `403` が返されます。これにより、ブラウザのページから API にアクセスできないようにしています。
- `GET` のルートは読み取りだけを行います。設定を変更するには `PUT` または `POST` を使います。たとえば `PUT /v1/low-power-mode` に `{"enabled": true}` を送ります。
-Swift のアプリでは、`VPhoneAPIKit` パッケージの `VPhoneAPIClient` を使えます。トークンは自動で送られます。例はリファレンスをご覧ください。
+Swift のアプリでは、`VPhoneExternalAccessKit` ライブラリの `VPhoneAPIClient` を使えます。トークンは自動で送られます。例はリファレンスをご覧ください。
## ネットワークでリッスンせずに使う
diff --git a/Documents/ko/machines/automation-api.md b/Documents/ko/machines/automation-api.md
index 78852e33..02792285 100644
--- a/Documents/ko/machines/automation-api.md
+++ b/Documents/ko/machines/automation-api.md
@@ -64,7 +64,7 @@ websocat --binary "ws://127.0.0.1:8765/v1/shell?token=$TOKEN&cols=120&rows=40"
- `Origin` 헤더가 있는 요청, 또는 `Host`가 `vphoned`, `localhost`, `127.0.0.1`, `::1`이 아닌 요청에는 `403`이 반환됩니다. 이렇게 웹 페이지가 API에 접근하지 못하도록 막습니다.
- `GET` 경로는 읽기만 합니다. 설정을 변경하려면 `PUT`이나 `POST`를 사용하세요. 예를 들어 `PUT /v1/low-power-mode`에 `{"enabled": true}`를 보냅니다.
-Swift 앱에서는 `VPhoneAPIKit` 패키지의 `VPhoneAPIClient`를 사용할 수 있으며, token은 이 클라이언트가 알아서 보냅니다. 예시는 레퍼런스를 참고하세요.
+Swift 앱에서는 `VPhoneExternalAccessKit` 라이브러리의 `VPhoneAPIClient`를 사용할 수 있으며, token은 이 클라이언트가 알아서 보냅니다. 예시는 레퍼런스를 참고하세요.
## 네트워크 리스너 없이 사용하기
diff --git a/Documents/zh/machines/automation-api.md b/Documents/zh/machines/automation-api.md
index 7870a990..2868be3f 100644
--- a/Documents/zh/machines/automation-api.md
+++ b/Documents/zh/machines/automation-api.md
@@ -64,7 +64,7 @@ websocat --binary "ws://127.0.0.1:8765/v1/shell?token=$TOKEN&cols=120&rows=40"
- 带有 `Origin` 请求头的请求,或者 `Host` 不是 `vphoned`、`localhost`、`127.0.0.1` 或 `::1` 的请求,会返回 `403`。这样可以阻止网页访问 API。
- `GET` 路由只读取。要更改设置,请使用 `PUT` 或 `POST`,例如对 `PUT /v1/low-power-mode` 发送 `{"enabled": true}`。
-Swift App 可以使用 `VPhoneAPIKit` 软件包中的 `VPhoneAPIClient`,它会自动发送 token;示例见 API 参考。
+Swift App 可以使用 `VPhoneExternalAccessKit` 库中的 `VPhoneAPIClient`,它会自动发送 token;示例见 API 参考。
## 不使用网络监听器
diff --git a/Research/vphoned_http_api.md b/Research/vphoned_http_api.md
index 12d37194..20a88da9 100644
--- a/Research/vphoned_http_api.md
+++ b/Research/vphoned_http_api.md
@@ -73,9 +73,10 @@ to. Neither sends `Origin`. GET routes only read. vphoned ignores a GET
request body, so `GET /v1/low-power-mode` cannot turn low power mode on or
off; use `PUT` with `{"enabled": true}`.
-The SwiftPM `VPhoneAPIKit` product is an unentitled HTTP/WebSocket client for
-`vphone-ui` and other macOS apps. The separate public `VPhoneVirtualMachineKit` product
-exposes `VPhoneAPIProxy` to an app that owns a `VZVirtioSocketDevice`. The
+The `VPhoneExternalAccessKit` static library (`VPhoneKit/VPhoneKit.xcodeproj`) is an
+unentitled HTTP/WebSocket client for `vphone-ui` and other macOS apps. The separate
+`VPhoneVirtualMachineKit` static library exposes `VPhoneAPIProxy` to an app that owns
+a `VZVirtioSocketDevice`. The
command-line executable remains unentitled and still launches `vphone-vm`.
The guest links IcliKit directly. App registration refresh is available through
@@ -1202,7 +1203,8 @@ websocat --binary "ws://127.0.0.1:8765/v1/shell?program=bash&token=$TOKEN"
```
```swift
-import VPhoneAPIKit
+import Foundation
+import VPhoneExternalAccessKit
let client = VPhoneAPIClient(
baseURL: URL(string: "http://127.0.0.1:8765")!,