Skip to content

Commit fa0d335

Browse files
authored
[Docs] Explain how to enable plugins in Xcode and Xcode Cloud (#653)
### Motivation By default, adopters hit this error both in Xcode and Xcode Cloud and might not be familiar with how to resolve it. ### Modifications Expand the FAQ to cover how to enable plugins in Xcode and Xcode Cloud. ### Result Better docs, adopters can find a solution easier. ### Test Plan N/A
1 parent 58a276a commit fa0d335

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Sources/swift-openapi-generator/Documentation.docc/Articles/Frequently-asked-questions.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,23 @@ For Xcode projects, make sure the target that uses the Swift OpenAPI Generator b
7171
Alternatively, change the access modifier of the generated code to either `internal` (if no code outside of that module needs to use it) or `public` (if the generated code is exported to other modules and packages.) You can do so by setting `accessModifier: internal` in the generator configuration file, or by providing `--access-modifier internal` to the `swift-openapi-generator` CLI.
7272

7373
For details, check out <doc:Configuring-the-generator>.
74+
75+
### How do I enable the build plugin in Xcode and Xcode Cloud?
76+
77+
By default, you must explicitly enable build plugins before they are allowed to run.
78+
79+
Before a plugin is enabled, you will encounter a build error with the message `"OpenAPIGenerator" is disabled`.
80+
81+
In Xcode, enable the plugin by clicking the "Enable Plugin" button next to the build error and confirm the dialog by clicking "Trust & Enable".
82+
83+
In Xcode Cloud, add the script `ci_scripts/ci_post_clone.sh` next to your Xcode project or workspace, containing:
84+
85+
```bash
86+
#!/usr/bin/env bash
87+
88+
set -e
89+
90+
defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES
91+
```
92+
93+
Learn more about Xcode Cloud custom scripts in the [documentation](https://developer.apple.com/documentation/xcode/writing-custom-build-scripts).

0 commit comments

Comments
 (0)