Skip to content
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

Update QuickStartGuide - add library #228

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions Docs/QuickStartGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

This is a quick start guide to creating the most minimal Turbo iOS application from scratch get up and running in a few minutes. This will support basic back/forward navigation, but will not be a fully functional application.

1. First, create a new iOS app from the Xcode File > New > Project menu and choose the default iOS "App" template. Note: When using XCode >= 12, be sure to choose "Storyboard" under "Interface" and "UIKit App Delegate" under "Lifecycle" in the project creation dialog.
1. First, create a new iOS app from the Xcode File > New > Project menu and choose the default iOS "App" template. Be sure to choose "Storyboard" under "Interface" in the project creation dialog.

2. Select your app's main top-level project, go to the Swift Packages tab and add the Turbo iOS dependency by entering in `https:/hotwired/turbo-ios`.
2. Select your app's main top-level project in the Navigator panel, and select the project in the Project and Targets list, and go to the Package Dependencies tab and add the Turbo iOS dependency by entering in `https:/hotwired/turbo-ios`.

3. Open the `SceneDelegate`, and replace the entire file with this code:
3. In the Project and Targets List, select the main Target, and in the General tab, scroll down to Frameworks, Libraries, and Embedded Content. Add the Turbo Library within the Turbo Package.

4. Open the `SceneDelegate`, and replace the entire file with this code:
```swift
import UIKit
import Turbo
Expand Down Expand Up @@ -49,8 +51,8 @@ extension SceneDelegate: SessionDelegate {
}
```

4. Hit run, and you have a basic working app. You can now tap links and navigate the demo back and forth in the simulator. We've only touched the very core requirements here of creating a `Session` and handling a visit.
5. Hit run, and you have a basic working app. You can now tap links and navigate the demo back and forth in the simulator. We've only touched the very core requirements here of creating a `Session` and handling a visit.

5. You can change the url we use for the initial visit to your web app. Note: if you're running your app locally without https, you'll need to adjust your `NSAppTransportSecurity` settings in the Info.plist to allow arbitrary loads.
6. You can change the url we use for the initial visit to your web app. Note: if you're running your app locally without https, you'll need to adjust your `NSAppTransportSecurity` settings in the Info.plist to allow arbitrary loads.

6. A real application will want to customize the view controller, respond to different visit actions, gracefully handle errors, and build a more powerful routing system. Read the rest of the documentation to learn more.
7. A real application will want to customize the view controller, respond to different visit actions, gracefully handle errors, and build a more powerful routing system. Read the rest of the documentation to learn more.