Skip to content

Commit 0b0a3ee

Browse files
feat: add support for previewing on mobile (#50)
* feat: add support for previewing on mobile * test: add test coverage for mobile scenarios * Update messages/lightning.preview.app.md Co-authored-by: Kevin Hawkins <khawkins@salesforce.com> * Update messages/lightning.preview.app.md Co-authored-by: Kevin Hawkins <khawkins@salesforce.com> * chore: minor cleanup * chore: pr feedback --------- Co-authored-by: Kevin Hawkins <khawkins@salesforce.com>
1 parent 3e3ae0d commit 0b0a3ee

File tree

6 files changed

+2829
-3114
lines changed

6 files changed

+2829
-3114
lines changed

messages/lightning.preview.app.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,106 @@ For mobile virtual devices, specify the device ID to preview. If omitted, the fi
3939

4040
Unable to determine App Id for %s
4141

42+
# error.device.notfound
43+
44+
Unable to find device %s
45+
46+
# spinner.device.boot
47+
48+
Booting device %s
49+
50+
# spinner.cert.gen
51+
52+
Generating self-signed certificate
53+
54+
# spinner.extract.archive
55+
56+
Extracting archive
57+
58+
# spinner.download.preparing
59+
60+
Preparing to download
61+
62+
# spinner.downloading
63+
64+
Downloading
65+
66+
# certificate.attention
67+
68+
╔═══════════╗
69+
║ ATTENTION ║
70+
╚═══════════╝
71+
72+
# certificate.installation.description
73+
74+
If you have not done so already, please install the self-signed certificate on your device before proceeding. The certificate file is located at
75+
76+
`%s`
77+
78+
Follow the steps below to install the certificate:
79+
80+
%s
81+
82+
# certificate.installation.steps.ios
83+
84+
1. Drag and drop the file on to your booted simulator.
85+
2. Tap `Allow` to proceed with downloading the configuration file.
86+
3. Tap `Close` and navigate to `Settings > General > VPN & Device Management > localhost`.
87+
4. Tap `Install` in the title bar, in the warning window, and on the install button.
88+
5. In the `Profile Installed` view, confirm that the profile shows as `Verified` and Tap `Done`.
89+
6. Now navigate to `Settings > General > About > Certificate Trust Settings`.
90+
7. Toggle full trust for `localhost` to enable full trust.
91+
8. In the warning dialog, tap `Continue`.
92+
93+
# certificate.installation.steps.android
94+
95+
1. Drag and drop the file on to your booted emulator.
96+
2. %s
97+
3. Browse to the certificate file that you transferred from step 1 (usually under `/sdcard/download`).
98+
4. Follow the on-screen instructions to install it.
99+
5. Tap on `User credentials` under `Credential storage` and verify that your certificate is listed there.
100+
6. Tap on `Trusted credentials` under `Credential storage`. Then tap on `USER` and verify that your certificate is listed there.
101+
102+
# certificate.installation.steps.android.nav-target-api-24-25
103+
104+
Navigate to `Settings > Security` and tap on `Install from SD card` under `Credential storage`.
105+
106+
# certificate.installation.steps.android.nav-target-api-26-27
107+
108+
Navigate to `Settings > Security & Location > Encryption & credentials` and tap on `Install from SD card` under `Credential storage`.
109+
110+
# certificate.installation.steps.android.nav-target-api-28
111+
112+
Navigate to `Settings > Security & Location > Advanced > Encryption & credentials` and tap on `Install from SD card` under `Credential storage`.
113+
114+
# certificate.installation.steps.android.nav-target-api-29
115+
116+
Navigate to `Settings > Security > Encryption & credentials` and tap on `Install from SD card` under `Credential storage`.
117+
118+
# certificate.installation.steps.android.nav-target-api-30-32
119+
120+
Navigate to `Settings > Security > Encryption & credentials` and tap on `Install a certificate` under `Credential storage`. Now tap on `CA certificate` and on `Install anyway`.
121+
122+
# certificate.installation.steps.android.nav-target-api-33
123+
124+
Navigate to `Settings > Security > More security settings > Encryption & credentials` and tap on `Install a certificate` under `Credential storage`. Now tap on `CA certificate` and on `Install anyway`.
125+
126+
# certificate.installation.steps.android.nav-target-api-34-up
127+
128+
Navigate to `Settings > Security & Privacy > More security & privacy > Encryption & credentials` and tap on `Install a certificate` under `Credential storage`. Now tap on `CA certificate` and on `Install anyway`.
129+
130+
# certificate.waiting
131+
132+
After installing the certificate, press any key to continue...
133+
134+
# mobileapp.notfound
135+
136+
%s is not installed on your device.
137+
138+
# mobileapp.download
139+
140+
%s is not installed on your device. Do you want to download and install it
141+
42142
# examples
43143

44144
- <%= config.bin %> <%= command.id %>

package.json

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,28 @@
55
"author": "Salesforce",
66
"bugs": "https://github.com/forcedotcom/cli/issues",
77
"dependencies": {
8+
"@lwrjs/api": "0.13.0-alpha.19",
89
"@oclif/core": "^3.26.6",
910
"@salesforce/core": "^7.3.9",
1011
"@salesforce/kit": "^3.1.2",
11-
"@salesforce/lwc-dev-mobile-core": "4.0.0-alpha.1",
12-
"@salesforce/sf-plugins-core": "^9.0.14",
12+
"@salesforce/lwc-dev-mobile-core": "4.0.0-alpha.3",
13+
"@salesforce/sf-plugins-core": "^9.1.1",
1314
"@inquirer/select": "^2.3.5",
14-
"tar": "^7.2.0",
15-
"lwc": "6.6.4",
15+
"chalk": "^5.3.0",
16+
"lwc": "6.6.5",
1617
"lwr": "0.13.0-alpha.19",
17-
"@lwrjs/api": "0.13.0-alpha.19"
18+
"node-fetch": "^3.3.2",
19+
"tar": "^7.2.0"
1820
},
1921
"devDependencies": {
20-
"@oclif/plugin-command-snapshot": "^5.1.9",
21-
"@salesforce/cli-plugins-testkit": "^5.3.8",
22+
"@oclif/plugin-command-snapshot": "^5.2.1",
23+
"@salesforce/cli-plugins-testkit": "^5.3.9",
2224
"@salesforce/dev-scripts": "^9.1.2",
23-
"@salesforce/plugin-command-reference": "^3.0.88",
25+
"@salesforce/plugin-command-reference": "^3.0.90",
26+
"@types/node-fetch": "^2.6.11",
2427
"@types/tar": "^6.1.13",
2528
"eslint-plugin-sf-plugin": "^1.18.5",
26-
"oclif": "^4.11.3",
29+
"oclif": "^4.12.3",
2730
"ts-node": "^10.9.2",
2831
"typescript": "^5.4.5"
2932
},
@@ -211,4 +214,4 @@
211214
},
212215
"exports": "./lib/index.js",
213216
"type": "module"
214-
}
217+
}

0 commit comments

Comments
 (0)