惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 三生石上(FineUI控件)
月光博客
月光博客
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队
Stack Overflow Blog
Stack Overflow Blog
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
IT之家
IT之家
宝玉的分享
宝玉的分享
A
About on SuperTechFans
Vercel News
Vercel News
P
Proofpoint News Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 【当耐特】
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
Visual Studio Blog
Jina AI
Jina AI
Y
Y Combinator Blog
T
Tailwind CSS Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
feat(ios): default to hosted push relay (#88096) · opencl...
ngutman · 2026-05-30 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -73,9 +73,10 @@ Release behavior:

7373

- Changing the root gateway version does not change the iOS app version until you explicitly pin from the gateway.

7474

- See `apps/ios/VERSIONING.md` for the full workflow.

7575
76-

Required env for beta builds:

76+

Relay behavior for beta builds:

7777
78-

- `OPENCLAW_PUSH_RELAY_BASE_URL=https://relay.example.com`

78+

- Beta builds default to `https://ios-push-relay.openclaw.ai`.

79+

- Optional custom relay override: `OPENCLAW_PUSH_RELAY_BASE_URL=https://relay.example.com`

7980

This must be a plain `https://host[:port][/path]` base URL without whitespace, query params, fragments, or xcconfig metacharacters.

8081
8182

Archive without upload:

@@ -118,7 +119,7 @@ scripts/ios-asc-keychain-setup.sh \

118119
119120

This should create `apps/ios/fastlane/.env` with the non-secret ASC variables while the private key stays in Keychain.

120121
121-

3. Set the official/TestFlight relay URL for the build:

122+

3. Optional: set a custom official/TestFlight relay URL for the build. If unset, the beta flow uses `https://ios-push-relay.openclaw.ai`.

122123
123124

```bash

124125

export OPENCLAW_PUSH_RELAY_BASE_URL=https://relay.example.com

Original file line numberDiff line numberDiff line change

@@ -17,6 +17,7 @@ private struct RelayGatewayPushRegistrationPayload: Encodable {

1717

var topic: String

1818

var environment: String

1919

var distribution: String

20+

var relayOrigin: String

2021

var tokenDebugSuffix: String?

2122

}

2223

@@ -107,6 +108,7 @@ actor PushRegistrationManager {

107108

topic: topic,

108109

environment: self.buildConfig.apnsEnvironment.rawValue,

109110

distribution: self.buildConfig.distribution.rawValue,

111+

relayOrigin: relayOrigin,

110112

tokenDebugSuffix: stored.tokenDebugSuffix))

111113

}

112114

@@ -138,6 +140,7 @@ actor PushRegistrationManager {

138140

topic: topic,

139141

environment: self.buildConfig.apnsEnvironment.rawValue,

140142

distribution: self.buildConfig.distribution.rawValue,

143+

relayOrigin: relayOrigin,

141144

tokenDebugSuffix: registrationState.tokenDebugSuffix))

142145

}

143146
Original file line numberDiff line numberDiff line change

@@ -337,9 +337,9 @@ candidate contains redacted secret placeholders such as `***`.

337337

</Accordion>

338338
339339

<Accordion title="Enable relay-backed push for official iOS builds">

340-

Relay-backed push is configured in `openclaw.json`.

340+

Relay-backed push uses the hosted OpenClaw relay by default: `https://ios-push-relay.openclaw.ai`.

341341
342-

Set this in gateway config:

342+

To use a custom relay, set this in gateway config:

343343
344344

```json5

345345

{

@@ -373,8 +373,8 @@ candidate contains redacted secret placeholders such as `***`.

373373
374374

End-to-end flow:

375375
376-

1. Install an official/TestFlight iOS build that was compiled with the same relay base URL.

377-

2. Configure `gateway.push.apns.relay.baseUrl` on the gateway.

376+

1. Install an official/TestFlight iOS build.

377+

2. Optional: configure `gateway.push.apns.relay.baseUrl` on the gateway only when using a custom relay deployment.

378378

3. Pair the iOS app to the gateway and let both node and operator sessions connect.

379379

4. The iOS app fetches the gateway identity, registers with the relay using App Attest plus the app receipt, and then publishes the relay-backed `push.apns.register` payload to the paired gateway.

380380

5. The gateway stores the relay handle and send grant, then uses them for `push.test`, wake nudges, and reconnect wakes.

@@ -387,6 +387,7 @@ candidate contains redacted secret placeholders such as `***`.

387387

Compatibility note:

388388
389389

- `OPENCLAW_APNS_RELAY_BASE_URL` and `OPENCLAW_APNS_RELAY_TIMEOUT_MS` still work as temporary env overrides.

390+

- Custom gateway relay URLs must match the relay base URL baked into the official/TestFlight iOS build.

390391

- `OPENCLAW_APNS_RELAY_ALLOW_HTTP=true` remains a loopback-only development escape hatch; do not persist HTTP relay URLs in config.

391392
392393

See [iOS App](/platforms/ios#relay-backed-push-for-official-builds) for the end-to-end flow and [Authentication and trust flow](/platforms/ios#authentication-and-trust-flow) for the relay security model.

Original file line numberDiff line numberDiff line change

@@ -75,7 +75,9 @@ openclaw gateway call node.list --params "{}"

7575

Official distributed iOS builds use the external push relay instead of publishing the raw APNs

7676

token to the gateway.

7777
78-

Gateway-side requirement:

78+

By default, official/TestFlight builds and gateways use the hosted relay at `https://ios-push-relay.openclaw.ai`.

79+
80+

Custom relay deployments can override the gateway relay URL:

7981
8082

```json5

8183

{

@@ -98,7 +100,7 @@ How the flow works:

98100

- The iOS app fetches the paired gateway identity and includes it in relay registration, so the relay-backed registration is delegated to that specific gateway.

99101

- The app forwards that relay-backed registration to the paired gateway with `push.apns.register`.

100102

- The gateway uses that stored relay handle for `push.test`, background wakes, and wake nudges.

101-

- The gateway relay base URL must match the relay URL baked into the official/TestFlight iOS build.

103+

- Custom gateway relay URLs must match the relay URL baked into the official/TestFlight iOS build.

102104

- If the app later connects to a different gateway or a build with a different relay base URL, it refreshes the relay registration instead of reusing the old binding.

103105
104106

What the gateway does **not** need for this path:

@@ -109,7 +111,7 @@ What the gateway does **not** need for this path:

109111

Expected operator flow:

110112
111113

1. Install the official/TestFlight iOS build.

112-

2. Set `gateway.push.apns.relay.baseUrl` on the gateway.

114+

2. Optional: set `gateway.push.apns.relay.baseUrl` on the gateway only when using a custom relay deployment.

113115

3. Pair the app to the gateway and let it finish connecting.

114116

4. The app publishes `push.apns.register` automatically after it has an APNs token, the operator session is connected, and relay registration succeeds.

115117

5. After that, `push.test`, reconnect wakes, and wake nudges can use the stored relay-backed registration.

@@ -128,6 +130,7 @@ compatible but does not count as a durable last-seen update.

128130

Compatibility note:

129131
130132

- `OPENCLAW_APNS_RELAY_BASE_URL` still works as a temporary env override for the gateway.

133+

- `OPENCLAW_PUSH_RELAY_BASE_URL` still works as a temporary env override for official/TestFlight iOS builds.

131134
132135

## Authentication and trust flow

133136
Original file line numberDiff line numberDiff line change

@@ -4,6 +4,9 @@ set -euo pipefail

44

usage() {

55

cat <<'EOF'

66

Usage:

7+

scripts/ios-beta-prepare.sh --build-number 7 [--team-id TEAMID]

8+
9+

Optional custom relay:

710

OPENCLAW_PUSH_RELAY_BASE_URL=https://relay.example.com \

811

scripts/ios-beta-prepare.sh --build-number 7 [--team-id TEAMID]

912

@@ -26,7 +29,8 @@ VERSION_SYNC_HELPER="${ROOT_DIR}/scripts/ios-sync-versioning.ts"

2629
2730

BUILD_NUMBER=""

2831

TEAM_ID="${IOS_DEVELOPMENT_TEAM:-}"

29-

PUSH_RELAY_BASE_URL="${OPENCLAW_PUSH_RELAY_BASE_URL:-${IOS_PUSH_RELAY_BASE_URL:-}}"

32+

DEFAULT_IOS_PUSH_RELAY_BASE_URL="https://ios-push-relay.openclaw.ai"

33+

PUSH_RELAY_BASE_URL="${OPENCLAW_PUSH_RELAY_BASE_URL:-${IOS_PUSH_RELAY_BASE_URL:-${DEFAULT_IOS_PUSH_RELAY_BASE_URL}}}"

3034

PUSH_RELAY_BASE_URL_XCCONFIG=""

3135

IOS_VERSION=""

3236

@@ -118,11 +122,6 @@ if [[ -z "${TEAM_ID}" ]]; then

118122

exit 1

119123

fi

120124
121-

if [[ -z "${PUSH_RELAY_BASE_URL}" ]]; then

122-

echo "Missing OPENCLAW_PUSH_RELAY_BASE_URL (or IOS_PUSH_RELAY_BASE_URL) for beta relay registration." >&2

123-

exit 1

124-

fi

125-
126125

validate_push_relay_base_url "${PUSH_RELAY_BASE_URL}"

127126
128127

# `.xcconfig` treats `//` as a comment opener. Break the URL with a helper setting

Original file line numberDiff line numberDiff line change

@@ -552,9 +552,9 @@ export const FIELD_HELP: Record<string, string> = {

552552

"gateway.push.apns":

553553

"APNs delivery settings for iOS devices paired to this gateway. Use relay settings for official/TestFlight builds that register through the external push relay.",

554554

"gateway.push.apns.relay":

555-

"External relay settings for relay-backed APNs sends. The gateway uses this relay for push.test, wake nudges, and reconnect wakes after a paired official iOS build publishes a relay-backed registration.",

555+

"External relay settings for relay-backed APNs sends. The gateway uses the hosted OpenClaw relay by default, or this custom relay for push.test, wake nudges, and reconnect wakes after a paired official iOS build publishes a relay-backed registration.",

556556

"gateway.push.apns.relay.baseUrl":

557-

"Base HTTPS URL for the external APNs relay service used by official/TestFlight iOS builds. Keep this aligned with the relay URL baked into the iOS build so registration and send traffic hit the same deployment.",

557+

"Optional custom base HTTPS URL for the external APNs relay service used by official/TestFlight iOS builds. Keep this aligned with the relay URL baked into the iOS build so registration and send traffic hit the same deployment.",

558558

"gateway.push.apns.relay.timeoutMs":

559559

"Timeout in milliseconds for relay send requests from the gateway to the APNs relay (default: 10000). Increase for slower relays or networks, or lower to fail wake attempts faster.",

560560

"gateway.http.endpoints.chatCompletions.enabled":

Original file line numberDiff line numberDiff line change

@@ -87,7 +87,7 @@ const FIELD_PLACEHOLDERS: Record<string, string> = {

8787

"gateway.controlUi.basePath": "/openclaw",

8888

"gateway.controlUi.root": "dist/control-ui",

8989

"gateway.controlUi.allowedOrigins": "https://control.example.com",

90-

"gateway.push.apns.relay.baseUrl": "https://relay.example.com",

90+

"gateway.push.apns.relay.baseUrl": "https://ios-push-relay.openclaw.ai",

9191

"channels.mattermost.baseUrl": "https://chat.example.com",

9292

"agents.list[].identity.avatar": "avatars/openclaw.png",

9393

};

Original file line numberDiff line numberDiff line change

@@ -157,19 +157,30 @@ async function resolveDeliveryPlan(params: {

157157

}

158158

}

159159
160-

let relayConfig: ApnsRelayConfig | undefined;

160+

const relayConfigByNodeId = new Map<string, ApnsRelayConfig>();

161161

if (needsRelay) {

162-

const relay = resolveApnsRelayConfigFromEnv(process.env, getRuntimeConfig().gateway);

163-

if (relay.ok) {

164-

relayConfig = relay.value;

165-

} else {

166-

params.log.warn?.(`exec approvals: iOS relay APNs config unavailable: ${relay.error}`);

162+

for (const target of targets) {

163+

if (target.registration.transport !== "relay") {

164+

continue;

165+

}

166+

const relay = resolveApnsRelayConfigFromEnv(process.env, getRuntimeConfig().gateway, {

167+

registrationRelayOrigin: target.registration.relayOrigin,

168+

});

169+

if (relay.ok) {

170+

relayConfigByNodeId.set(target.nodeId, relay.value);

171+

} else {

172+

params.log.warn?.(`exec approvals: iOS relay APNs config unavailable: ${relay.error}`);

173+

}

167174

}

168175

}

176+

const relayConfig = relayConfigByNodeId.values().next().value;

169177
170178

return {

171179

targets: targets.filter((target) =>

172-

target.registration.transport === "direct" ? Boolean(directAuth) : Boolean(relayConfig),

180+

target.registration.transport === "direct"

181+

? Boolean(directAuth)

182+

: relayConfigByNodeId.has(target.nodeId) &&

183+

relayConfigByNodeId.get(target.nodeId)?.baseUrl === relayConfig?.baseUrl,

173184

),

174185

directAuth,

175186

relayConfig,

Original file line numberDiff line numberDiff line change

@@ -729,13 +729,17 @@ describe("node.invoke APNs wake path", () => {

729729

apnsReason: "Unregistered",

730730

apnsStatus: 410,

731731

});

732-

expect(mocks.resolveApnsRelayConfigFromEnv).toHaveBeenCalledWith(process.env, {

733-

push: {

734-

apns: {

735-

relay: DEFAULT_RELAY_CONFIG,

732+

expect(mocks.resolveApnsRelayConfigFromEnv).toHaveBeenCalledWith(

733+

process.env,

734+

{

735+

push: {

736+

apns: {

737+

relay: DEFAULT_RELAY_CONFIG,

738+

},

736739

},

737740

},

738-

});

741+

{ registrationRelayOrigin: undefined },

742+

);

739743

expect(mocks.shouldClearStoredApnsRegistration).toHaveBeenCalledWith({

740744

registration,

741745

result: {

Original file line numberDiff line numberDiff line change

@@ -199,8 +199,16 @@ async function resolveDirectNodePushConfig() {

199199

: { ok: false as const, error: auth.error };

200200

}

201201
202-

function resolveRelayNodePushConfig(cfg: OpenClawConfig) {

203-

const relay = resolveApnsRelayConfigFromEnv(process.env, cfg.gateway);

202+

function resolveRelayNodePushConfig(

203+

cfg: OpenClawConfig,

204+

registration: Extract<

205+

NonNullable<Awaited<ReturnType<typeof loadApnsRegistration>>>,

206+

{ transport: "relay" }

207+

>,

208+

) {

209+

const relay = resolveApnsRelayConfigFromEnv(process.env, cfg.gateway, {

210+

registrationRelayOrigin: registration.relayOrigin,

211+

});

204212

return relay.ok

205213

? { ok: true as const, relayConfig: relay.value }

206214

: { ok: false as const, error: relay.error };

@@ -493,7 +501,7 @@ export async function maybeWakeNodeWithApns(

493501
494502

let wakeResult;

495503

if (registration.transport === "relay") {

496-

const relay = resolveRelayNodePushConfig(opts?.cfg ?? getRuntimeConfig());

504+

const relay = resolveRelayNodePushConfig(opts?.cfg ?? getRuntimeConfig(), registration);

497505

if (!relay.ok) {

498506

return withDuration({

499507

available: false,

@@ -595,7 +603,7 @@ export async function maybeSendNodeWakeNudge(

595603

try {

596604

let result;

597605

if (registration.transport === "relay") {

598-

const relay = resolveRelayNodePushConfig(opts?.cfg ?? getRuntimeConfig());

606+

const relay = resolveRelayNodePushConfig(opts?.cfg ?? getRuntimeConfig(), registration);

599607

if (!relay.ok) {

600608

return withDuration({

601609

sent: false,