-
Notifications
You must be signed in to change notification settings - Fork 12
feat: add support for previewing on mobile #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
messages/lightning.preview.app.md
Outdated
# certificate.installation.steps.android | ||
|
||
1. Drag & drop the file on to your booted emulator. | ||
2. %s | ||
3. Browse to the certificate file that you transferred from step 1 (usually under `/sdcard/download`). | ||
4. Follow the on-screen instructions to install it. | ||
5. Tap on `User credentials` under `Credential storage` and verify that your certificate is listed there. | ||
6. Tap on `Trusted credentials` under `Credential storage`. Then tap on `USER` and verify that your certificate is listed there. | ||
|
||
# certificate.installation.steps.android.nav-target-api-24-25 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we really need to find a better way in the future b/c showing detailed instructions to the user is not sustainable on Android since they seem to keep changing their Settings menu very often and instructions become outdated
Co-authored-by: Kevin Hawkins <khawkins@salesforce.com>
Co-authored-by: Kevin Hawkins <khawkins@salesforce.com>
c099f27
to
58bbc4b
Compare
this.spinner.stop(); | ||
|
||
// 4. Generate self-signed certificate and wait for user to install it | ||
// TODO: update the save location to be the same as server config file path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That actually poses a good question. Given that the user needs to interact with the cert (i.e. for manual installation), it rules out putting it in a temp directory. I guess in the absence of the user being able to specify, I'd be inclined (in the final form) to simply save it in the current working directory.
This is one of the many features that will be exponentially nicer in a VSCode UX. 😐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be better to save the cert file in the same location as lwr.config.json
since we have another work item where we also need to update the config file to include cert & key. Bit I think in most (if not all) cases process.cwd
would be the same as the location of lwr.config.json
|
||
# certificate.installation.steps.ios | ||
|
||
1. Drag and drop the file on to your booted simulator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For both platforms, if it doesn't blow out the scope I wonder if we should consider more concise "inline" instructions, providing links to markdown pages on our repo that describe the installation instructions, complete with images? Maybe that could be a stretch goal for beta, or a GA consideration. I'm afraid anything less is likely going to result in confusion for our users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to do something like that at first but on Android the steps for navigating through the Settings app is different from one API to another. So I wasn't sure how that would work out if we wanted to use markdown pages containing screenshots that would be different depending on the emulator API level.
But if we go with printing the instructions to console like I'm doing in this PR, at least then I can programmatically determine what is the API level for the user specified emulator and I can dynamically compose the steps.
But in general I think we should try to see if we can find a solution where the user would not need to install the cert manually (if at all possible)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall.
What does this PR do?
Adds support for
sf lightning preview app
command for mobile.To run the command, ensure that you have authorized at least one org:
sf lightning preview app -o MyOrg -n MyApp -t ios -i 'iPhone 15 Pro Max'
sf lightning preview app -o MyOrg -n MyApp -t android -i 'Pixel 5 API 34'
What issues does this PR fix or reference?
@W-15813034@
@W-15813106@
@W-15001240@
@W-15578370@