-
Notifications
You must be signed in to change notification settings - Fork 192
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
Rework homepage / getting started flow #862
base: main
Are you sure you want to change the base?
Conversation
@@ -3,19 +3,16 @@ layout: page | |||
title: Build a Command-line Tool | |||
--- | |||
|
|||
> The source code for this guide can be found [on GitHub](https://github.com/apple/swift-getting-started-cli) |
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.
Why have we removed this link to the repo?
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.
Yeah, this should probably stay. It feels duplicative to have it at the top and the bottom, though -- what do you think about removing the bottom reference?
(The rationale was to reduce extraneous content from these guides to get to a short punchy intro to each area.)
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.
They were added at top and bottom to make it easy to find the code as that's what many people want to look at, either right at the start or when finishing the tutorial. I don't think it adds too much bloat having it in both
@@ -31,53 +28,53 @@ This will generate a new directory called MyCLI with the following files: | |||
|
|||
`Sources/main.swift` is the application entry point and where we’ll write our application code. | |||
|
|||
In fact, SwiftPM generated a "Hello, world!" project for us! | |||
In fact, Swift generated a "Hello, world!" project for us! |
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.
Are we happy with this? Because this is technically incorrect, it's SwiftPM that generates the project
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.
My rationale is simply that SwiftPM is an integral part of Swift. That the swift
command line utility calls SwiftPM to do the work of creating the template is an implementation detail during the first hour of experiencing Swift, in the same way that we don't need to say: "Running swift build will instruct SwiftPM to download the new dependencies and then proceed to build the code" even though your argument applies there too.
Thoughts? We don't want to be incorrect, obviously :)
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.
Fine by me
|
||
**Tip:** Although we’ll be targeting iOS 16, our code will also work great on macOS Ventura and beyond. | ||
Xcode is designed for running on Mac, and you can download it for free from [the | ||
Mac App Store](https://apps.apple.com/us/app/xcode/id497799835). |
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 think we've discussed this in the past, but we should link to https://developer.apple.com/download/applications/ instead. Mac App Store links don't work everywhere and are confusing on mobile
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.
Double-checking w/ the Xcode team.
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.
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'm not overly keen on it (auto updates are problematic and slow, the App Store still isn't on 16.2, the developer site links to both Mac App Store and direct download etc but it's not something I feel super strong about
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.
There also have been a number of time over the past years where after a new Xcode release, the direct download has been fine but there has been something wrong with the Mac App Store version.
I do use the Mac App Store version on my own machine but I always wait a week or so before updating because this has happened regularly enough to make me wary of updating immediately.
|
||
In this tutorial you’re going to use Swift and SwiftUI to build a small app to recommend fun new activities to users. Along the way you’ll meet several of the basic components of a SwiftUI app, including text, images, buttons, shapes, stacks, and program state. | ||
|
||
To get started, you’ll need to [download Xcode from the Mac App Store](https://apps.apple.com/app/xcode/id497799835?mt=12). It’s free, and comes with Swift and all the other tools you need to follow this tutorial. |
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.
See above for comment about linking to the App Store
Co-authored-by: Tim Condon <[email protected]>
Bring getting started content front and center, streamlining the homepage and focusing on different Swift use cases.
Motivation:
Today's home page focuses on just three scenarios: Apple platforms, CLI and server. A separate "Getting Started" page duplicates some of these and adds other choices (e.g. embedded). This is confusing. Additionally, the first steps for installation vary depending on the scenario (e.g. a CLI developer may want the static toolchain, an app developer wants Xcode, a cloud developer wants Docker, and an embedded developer needs cross-compilation instructions.
The goal is to get any new Swift user to a great first hour experience focused on their needs.
Modifications:
The home page will contain a catalog of all scenarios that a developer can use Swift for. And for each of these, a separate page will provide some simple steps, a small sample of code, and a graphic of Swift running in that scenario, along with a list of packages that will be helpful, demonstrating the breadth of ecosystem for each. We'll do that by:
Result:
Desired result is more developers clicking on one of the scenarios, and getting to a delightful first hour with Swift that is tailored around their needs.