Skip to content

Commit 827fa72

Browse files
authored
[Docs] Update Xcode tutorial for Xcode 16 (#662)
### Motivation Xcode 16 shipped and our Xcode tutorial wasn't accurate anymore. ### Modifications Update the tutorial to match Xcode 16's UI. ### Result Tutorial is more accurate for newcomers who install Xcode 16 and try out Swift OpenAPI Generator. ### Test Plan Manually went through it.
1 parent 7b4dd6b commit 827fa72

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Sources/swift-openapi-generator/Documentation.docc/Tutorials/ClientXcode.tutorial

+7-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
@Step {
5151
Add the two configuration files required by the Swift OpenAPI Generator build plugin.
5252

53-
The first is the OpenAPI document. Add it to to the "GreetingServiceClient" target by right-clicking on the "GreetingServiceClient" folder in the project navigator, and choosing Add Files to "GreetingServiceClient"…
53+
The first is the OpenAPI document. Add it to to the "GreetingServiceClient" target by right-clicking on the "GreetingServiceClient" folder in the project navigator, choosing "New Empty File", and pasting the OpenAPI document on the right.
5454
@Code(name: "Sources/openapi.yaml", file: client.openapi.yaml)
5555
}
5656
@Step {
@@ -64,6 +64,11 @@
6464

6565
@Code(name: "Sources/openapi-generator-config.yaml", file: client.openapi-generator-config.yaml)
6666
}
67+
@Step {
68+
Include the two files in the target by going to the Build Phases tab of the "GreetingServiceClient" target in the Project Editor, and adding the two files to the "Compile Sources" section.
69+
70+
If you skip this step, you will see the error "Issues with required files: No config file found in the target...".
71+
}
6772
@Step {
6873
With the configuration files in place, we will add the following three package dependencies: the build plugin, the Runtime library, and a concrete client transport that uses URLSession to send HTTP requests.
6974

@@ -91,7 +96,7 @@
9196
Click the plus button and add the OpenAPIGenerator plugin.
9297
}
9398
@Step {
94-
To verify everything is configured correctly, choose Product -> Build. If this is the first time using the plugin, you will be asked for confirmation that you trust the plugin. To continue, click Trust & Enable All.
99+
To verify everything is configured correctly, choose Product -> Build. If this is the first time using the plugin, you will encounter a build error with the message `"OpenAPIGenerator" is disabled`. To continue, click on the error in the Issue Navigator, click "Trust & Enable", and choose Product -> Build again.
95100

96101
Xcode now builds the Swift OpenAPI Generator plugin itself, and then runs it on the configuration files `openapi.yaml` and `openapi-generator-config.yaml` to generate a Swift client for GreetingService. Once it finishes, the `Client` type will become available in the GreetingServiceClient target.
97102
}

0 commit comments

Comments
 (0)