You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: smart-account-demo/README.md
+44-4Lines changed: 44 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,11 +120,21 @@ open StellarSmartDemo.xcodeproj
120
120
```
121
121
122
122
In Xcode:
123
-
1. Add the swift-sodium package if not already added (File > Add Packages > `https://github.com/jedisct1/swift-sodium`). Select the Clibsodium product.
124
-
2. Select the StellarSmartDemo scheme and an iOS 16.0+ simulator.
2. Set your signing team: select the StellarSmartDemo target -> Signing & Capabilities -> Team. This is required for both simulator and device builds and must be set after every `xcodegen generate`.
125
+
3. Select the StellarSmartDemo scheme and an iOS 16.0+ simulator.
126
+
4. Run (Cmd+R).
126
127
127
-
**Running on a physical device**: The default configuration targets the iOS simulator. To run on a physical iPhone, change the framework dependency path in `iosApp/project.yml` from `iosSimulatorArm64` to `iosArm64`, regenerate the Xcode project with `xcodegen generate`, select your device in Xcode, and build. You also need a valid signing team configured in the Signing & Capabilities tab.
128
+
**Switching between simulator and physical device:**
129
+
130
+
The framework dependency in `project.yml` (line 55) must match the target platform. After changing it, run `xcodegen generate` to regenerate the Xcode project, then set your signing team again.
131
+
132
+
| Target | Framework path in project.yml line 55 |
The pre-build script automatically builds the correct Kotlin framework based on the selected target platform. You only need to change the framework dependency path and regenerate.
128
138
129
139
### macOS
130
140
@@ -201,11 +211,41 @@ All testnet configuration is centralized in `shared/src/commonMain/kotlin/com/so
201
211
|`DEFAULT_INDEXER_URL`| Credential-to-contract address lookup service |
202
212
|`DEFAULT_RP_ID`| WebAuthn Relying Party ID (`soneso.com`) |
203
213
|`RP_NAME`| Display name for passkey prompts |
214
+
|`REOWN_PROJECT_ID`| Reown (WalletConnect) project ID for external wallet connection |
204
215
205
216
DEMO token settings (`DEMO_TOKEN_*`) control the deterministic deployment and minting of a custom Soroban token used for testing transfers.
206
217
207
218
Known policy contracts (threshold, spending limit, weighted threshold) are defined in `KNOWN_POLICIES`.
208
219
220
+
## External Wallet Connection (Freighter)
221
+
222
+
The demo supports connecting an external Stellar wallet (Freighter) as a delegated signer, as an alternative to entering a secret key manually.
223
+
224
+
| Platform | Method | Requirement |
225
+
|----------|--------|-------------|
226
+
| Web | Freighter browser extension | Install from [freighter.app](https://www.freighter.app/)|
227
+
| Android | WalletConnect v2 (Reown) | Freighter Mobile on the same device |
228
+
| iOS | WalletConnect v2 (Reown) | Freighter Mobile on the same device |
229
+
| macOS | Not available | Use secret key entry |
230
+
231
+
Wallet connection buttons are hidden on simulators and emulators since WalletConnect requires the wallet app on a real device.
232
+
233
+
### Reown Project ID
234
+
235
+
Android and iOS use the [Reown](https://cloud.reown.com/) (WalletConnect v2) SDK. A project ID is required. Set `REOWN_PROJECT_ID` in `DemoConfig.kt`. Register for a free project ID at [cloud.reown.com](https://cloud.reown.com/).
236
+
237
+
### iOS App Group (required for device builds)
238
+
239
+
The Reown SDK requires an App Group for relay session storage. The entitlement `group.com.soneso.stellar.smartdemo` is configured in `iosApp/StellarSmartDemo/StellarSmartDemo.entitlements`.
240
+
241
+
To run on a physical iOS device, register this App Group in your Apple Developer account:
242
+
243
+
1. Go to [developer.apple.com](https://developer.apple.com/account/resources/identifiers/list/applicationGroup) -> Certificates, Identifiers & Profiles -> Identifiers -> App Groups
244
+
2. Click **+** and register `group.com.soneso.stellar.smartdemo`
245
+
3. In Xcode, refresh the App Group capability (Signing & Capabilities -> App Groups -> refresh button)
246
+
247
+
This is not needed for simulator builds (wallet connection is disabled on simulators).
0 commit comments