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: docs/5_mobile_native_app_generation.md
+59-21Lines changed: 59 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -273,8 +273,20 @@ By the end of each Design/Iterate phase, the user validates implemented features
273
273
274
274
#### Connected App Configuration
275
275
276
-
- Gather required Connected App Client ID and Callback URI
277
-
- Essential inputs for baseline mobile app project creation
276
+
For MSDK apps (Mobile SDK templates without custom properties), the workflow automatically retrieves Connected App credentials from the user's Salesforce org:
277
+
278
+
1.**Org Discovery**: The workflow executes `sf org list --json` to discover all connected Salesforce orgs (DevHubs) available on the user's machine
279
+
2.**Org Selection**: Presents the list of connected orgs to the user for selection
280
+
3.**Connected App Discovery**: Executes `sf org list metadata -m ConnectedApp --json -o <selectedOrg>` to discover available Connected Apps in the selected org
281
+
4.**Connected App Selection**: Presents the list of Connected Apps to the user for selection
282
+
5.**Metadata Retrieval**: Retrieves the selected Connected App's metadata using `sf project retrieve start -m ConnectedApp:<appName> -o <selectedOrg>` in a temporary SFDX project
283
+
6.**Credential Extraction**: Parses the XML metadata to extract the `consumerKey`, `callbackUrl`, and the org's `instanceUrl` (login host) for OAuth configuration
284
+
285
+
This approach is more secure than environment variables as it:
286
+
- Lets the user choose which org to retrieve credentials from
287
+
- Retrieves credentials directly from the selected org
288
+
- Ensures credentials match actual Connected App configuration
289
+
- Eliminates manual environment variable setup
278
290
279
291
#### Project Creation and Setup
280
292
@@ -837,16 +849,24 @@ The StateGraph implements the three-phase architecture through deterministic nod
0 commit comments