Skip to content

Commit f7f415f

Browse files
committed
fix(ios): wire share extension app group signing
1 parent 2983edd commit f7f415f

20 files changed

Lines changed: 137 additions & 8 deletions

apps/ios/Config/AppStoreSigning.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"signingRepo": "[email protected]:openclaw/apps-signing.git",
44
"signingBranch": "main",
55
"profileType": "appstore",
6+
"appGroupId": "group.ai.openclawfoundation.app.shared",
67
"targets": [
78
{
89
"target": "OpenClaw",
@@ -11,7 +12,8 @@
1112
"platform": "IOS",
1213
"profileKey": "OPENCLAW_APP_PROFILE",
1314
"profileName": "OpenClaw App Store ai.openclawfoundation.app",
14-
"capabilities": ["PUSH_NOTIFICATIONS"]
15+
"capabilities": ["PUSH_NOTIFICATIONS", "APP_GROUPS"],
16+
"appGroups": ["group.ai.openclawfoundation.app.shared"]
1517
},
1618
{
1719
"target": "OpenClawShareExtension",
@@ -20,7 +22,8 @@
2022
"platform": "IOS",
2123
"profileKey": "OPENCLAW_SHARE_PROFILE",
2224
"profileName": "OpenClaw App Store ai.openclawfoundation.app.share",
23-
"capabilities": []
25+
"capabilities": ["APP_GROUPS"],
26+
"appGroups": ["group.ai.openclawfoundation.app.shared"]
2427
},
2528
{
2629
"target": "OpenClawActivityWidget",

apps/ios/Config/Signing.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ OPENCLAW_DEVELOPMENT_TEAM = $(OPENCLAW_IOS_SELECTED_TEAM)
77
OPENCLAW_CODE_SIGN_STYLE = Automatic
88
OPENCLAW_CODE_SIGN_IDENTITY = Apple Development
99
OPENCLAW_APP_BUNDLE_ID = ai.openclawfoundation.app
10+
OPENCLAW_APP_GROUP_ID = group.ai.openclawfoundation.app.shared
1011
OPENCLAW_WATCH_APP_BUNDLE_ID = ai.openclawfoundation.app.watchkitapp
1112
OPENCLAW_ACTIVITY_WIDGET_BUNDLE_ID = ai.openclawfoundation.app.activitywidget
1213
OPENCLAW_ACTIVITY_WIDGET_PROFILE =

apps/ios/LocalSigning.xcconfig.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ OPENCLAW_DEVELOPMENT_TEAM = YOUR_TEAM_ID
77

88
OPENCLAW_APP_BUNDLE_ID = ai.openclawfoundation.app
99
OPENCLAW_SHARE_BUNDLE_ID = ai.openclawfoundation.app.share
10+
OPENCLAW_APP_GROUP_ID = group.ai.openclawfoundation.app.shared
1011
OPENCLAW_ACTIVITY_WIDGET_BUNDLE_ID = ai.openclawfoundation.app.activitywidget
1112
OPENCLAW_WATCH_APP_BUNDLE_ID = ai.openclawfoundation.app.watchkitapp
1213

apps/ios/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ Release-owner secrets:
101101

102102
- App Store Connect API auth uses Keychain for private key material plus non-secret `apps/ios/fastlane/.env` variables.
103103
- The encrypted signing repo password lives outside this repo in the release-owner vault and is exposed locally as `MATCH_PASSWORD`.
104+
- The share sheet requires the Apple Developer App Group in `apps/ios/Config/AppStoreSigning.json` to be associated with both the app and share-extension bundle IDs before App Store profiles are regenerated.
104105
- Apple Distribution private keys, certificates, provisioning profiles, and decrypted signing sync output stay under `apps/ios/build/` or Keychain and are gitignored.
105106
- Rotating release signing means refreshing Fastlane `match` assets and pushing a fresh encrypted sync state.
106107

@@ -156,6 +157,8 @@ This should create `apps/ios/fastlane/.env` with non-secret App Store Connect va
156157
- `ai.openclawfoundation.app.activitywidget`
157158
- `ai.openclawfoundation.app.watchkitapp`
158159

160+
The main app and share extension must both be associated with the App Group pinned in `apps/ios/Config/AppStoreSigning.json`.
161+
159162
Use `pnpm ios:release:signing:setup` for the initial portal setup, then `MATCH_PASSWORD=... pnpm ios:release:signing:sync:push` to publish encrypted Fastlane match assets to the shared private repo.
160163

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

apps/ios/ShareExtension/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,7 @@
4141
<key>NSExtensionPrincipalClass</key>
4242
<string>$(PRODUCT_MODULE_NAME).ShareViewController</string>
4343
</dict>
44+
<key>OpenClawAppGroupIdentifier</key>
45+
<string>$(OPENCLAW_APP_GROUP_ID)</string>
4446
</dict>
4547
</plist>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.application-groups</key>
6+
<array>
7+
<string>$(OPENCLAW_APP_GROUP_ID)</string>
8+
</array>
9+
</dict>
10+
</plist>

apps/ios/Signing.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ OPENCLAW_DEVELOPMENT_TEAM = FWJYW4S8P8
1010

1111
OPENCLAW_APP_BUNDLE_ID = ai.openclawfoundation.app
1212
OPENCLAW_SHARE_BUNDLE_ID = ai.openclawfoundation.app.share
13+
OPENCLAW_APP_GROUP_ID = group.ai.openclawfoundation.app.shared
1314
OPENCLAW_WATCH_APP_BUNDLE_ID = ai.openclawfoundation.app.watchkitapp
1415
OPENCLAW_ACTIVITY_WIDGET_BUNDLE_ID = ai.openclawfoundation.app.activitywidget
1516
OPENCLAW_APNS_ENTITLEMENT_ENVIRONMENT = development

apps/ios/Sources/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
<string>OpenClaw uses on-device speech recognition for talk mode and voice wake.</string>
7979
<key>NSSupportsLiveActivities</key>
8080
<true/>
81+
<key>OpenClawAppGroupIdentifier</key>
82+
<string>$(OPENCLAW_APP_GROUP_ID)</string>
8183
<key>OpenClawCanonicalVersion</key>
8284
<string>$(OPENCLAW_IOS_VERSION)</string>
8385
<key>OpenClawPushAPNsEnvironment</key>

apps/ios/Sources/OpenClaw.entitlements

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
<dict>
55
<key>aps-environment</key>
66
<string>$(OPENCLAW_APNS_ENTITLEMENT_ENVIRONMENT)</string>
7+
<key>com.apple.security.application-groups</key>
8+
<array>
9+
<string>$(OPENCLAW_APP_GROUP_ID)</string>
10+
</array>
711
</dict>
812
</plist>

apps/ios/Tests/ShareToAgentDeepLinkTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ import OpenClawKit
33
import Testing
44

55
@Suite struct ShareToAgentDeepLinkTests {
6+
@Test func appGroupIdentifierUsesCanonicalOpenClawGroup() {
7+
#expect(OpenClawAppGroup.canonicalIdentifier == "group.ai.openclawfoundation.app.shared")
8+
}
9+
610
@Test func buildMessageIncludesSharedFields() {
711
let payload = SharedContentPayload(
812
title: "Article",

0 commit comments

Comments
 (0)