-
Notifications
You must be signed in to change notification settings - Fork 9
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
docs: update quick start guides #271
Conversation
@eric-horodyski it looks like go will construct the path based on the running OS file separator so the content of the yml should match the OS its running on otherwise it could end up with a mix of the two. |
Fixed the Android guide to contain two separate |
Only feedback I have is the "Sync Appflow at build time" image on the iOS page shows the old instructions. Should probably recreate the screenshot with the new instructions. Instructions on how to create the screenshot can be found here: https://www.notion.so/ionic/Docs-Screenshot-How-To-d6d6be033b0e40829cb80cd628d0c4dd?pvs=4 |
@jthoms1 - images updated for both iOS and Android |
@eric-horodyski Sorry, just now looking at this. The methods we use in Go should actually automatically convert between filepath separators. I don't think you should need different files for *nix and windows. Specifically we use https://pkg.go.dev/path/filepath#Abs to get the absolute path to the source, which will call https://pkg.go.dev/path/filepath#Clean before returning to convert to proper separators. |
project.exec { | ||
commandLine 'cmd', '/c', 'rm', portalName + '.zip' | ||
commandLine 'portals', 'sync' |
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.
This still needs to know the location of the asset path:
commandLine 'portals', 'sync', '--destination', assetPath
Also, I'm pretty sure that the CLI isn't going to be picked up in the PATH by android studio, so you'd still need to do:
commandLine 'cmd', '/c', 'portals', 'sync', '--destination', assetPath
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 does through .portals.yaml
:
- app-id: 11a0971f
channel: production
directory-name: src/main/assets/featured_products
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.
Unless someone has tested on both a mac and windows machine otherwise. I know it doesn't show up in the PATH on Mac during my testing on an M-series machine.
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 have it working in another app. I do have it set on the PATH though, maybe I should call that out.
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 does through
.portals.yaml
:- app-id: 11a0971f channel: production directory-name: src/main/assets/featured_products
That's not really a portable example between iOS and android though. That would require the start dir on iOS be "src/main/assets/featured_products" if you're using the same config between ios and android
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.
Where is your portals cli located on your machine? Because from what I experienced if it is not in a folder that is part of the default macOS $PATH then it will not get picked up because of how the JVM forks. I was unable under any circumstances able to get it to pick up a $PATH environment variable that I set either when running the gradle task directly or through Android Studio. So, I feel like when people read this:
:::note
The Portals CLI must be registered as part of the `PATH` to run this command successfully.
:::
That they will think they can manipulate the PATH environment variable to get it to pick up, when it probably won't.
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.
Interesting, I just added it to my PATH in .zshrc
:
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jbr/Contents/Home
export VOLTA_HOME="$HOME/.volta"
export PORTALS_PATH="/opt/homebrew/opt/portals"
export STUDIO_PATH="/Applications/Android Studio.app/Contents/MacOS"
export PATH="$VOLTA_HOME/bin:$PORTALS_PATH:$STUDIO_PATH:$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.
Hm, are you opening Android Studio via the command line? Essentially the same problem should occur as with Xcode, in that it respects no PATH other than what is in /etc/paths
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.
Yes. However, I am more than happy to suggest something else instead of the note, just not sure what it would be.
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.
Hey so I tested fresh on Mac and Windows and both were picked up fine by Android studio on both machines. I installed via Brew on Mac and when I restarted Android Studio it was picking it up, and on Windows I followed the instructions on the download page for the Portals CLI and put it in a folder in my user dir, and added that to my system PATH in Windows, then restarted Android Studio and it finds it.
Update the iOS and Android guides to use the Portals CLI.
Additionally:
@carlpoole - using the Portals CLI, there's no need for a seperate Gradle task for Windows and *nix/MacOS. Can the same
.portals.yaml
file be used, or would you need a separate version wheredirectory-name
uses a Windows' constructed file path?